From 1e92b204f77ff3536b7f04a903e55ab553dac11d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 30 Jan 2016 23:50:11 +0100 Subject: [PATCH] Rename variable in TARGA image handler. Current name of the variable ('index') is misleading. Actually it represents number of bytes created on output so 'outputLength' name seems to be more relevant. --- src/common/imagtga.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/imagtga.cpp b/src/common/imagtga.cpp index 86a4fcccfd..dc14db549d 100644 --- a/src/common/imagtga.cpp +++ b/src/common/imagtga.cpp @@ -105,12 +105,12 @@ static int DecodeRLE(unsigned char* imageData, unsigned long imageSize, short pixelSize, wxInputStream& stream) { - unsigned long index = 0; + unsigned long outputLength = 0; unsigned char current; unsigned int length; unsigned char buf[4]; - while (index < imageSize) + while (outputLength < imageSize) { int ch = stream.GetC(); if ( ch == wxEOF ) @@ -128,9 +128,9 @@ int DecodeRLE(unsigned char* imageData, unsigned long imageSize, length = current; - index += current * pixelSize; + outputLength += current * pixelSize; - if (index > imageSize) + if (outputLength > imageSize) { return wxTGA_IOERR; } @@ -153,9 +153,9 @@ int DecodeRLE(unsigned char* imageData, unsigned long imageSize, length = current * pixelSize; - index += length; + outputLength += length; - if (index > imageSize) + if (outputLength > imageSize) { return wxTGA_IOERR; }