diff --git a/src/add-ons/translators/gif/GIFLoad.cpp b/src/add-ons/translators/gif/GIFLoad.cpp index 02a44f3e2d..64e73fef5e 100644 --- a/src/add-ons/translators/gif/GIFLoad.cpp +++ b/src/add-ons/translators/gif/GIFLoad.cpp @@ -339,7 +339,7 @@ GIFLoad::ReadGIFImageData() goto bad_end; //memcpy(newEntry, fOldCode, fOldCodeLength); - for (int x = 0; x < fOldCodeLength; x++) { + for (unsigned int x = 0; x < fOldCodeLength; x++) { newEntry[x] = fOldCode[x]; } @@ -347,7 +347,7 @@ GIFLoad::ReadGIFImageData() newEntry[fOldCodeLength] = *fTable[fNewCode]; } else { // Does not exist in table //memcpy(newEntry, fOldCode, fOldCodeLength); - for (int x = 0; x < fOldCodeLength; x++) { + for (unsigned int x = 0; x < fOldCodeLength; x++) { newEntry[x] = fOldCode[x]; } @@ -360,7 +360,7 @@ GIFLoad::ReadGIFImageData() fTable[fNextCode] = MemblockAllocate(fOldCodeLength + 1); //memcpy(fTable[fNextCode], newEntry, fOldCodeLength + 1); - for (int x = 0; x < fOldCodeLength + 1; x++) { + for (unsigned int x = 0; x < fOldCodeLength + 1; x++) { fTable[fNextCode][x] = newEntry[x]; } diff --git a/src/add-ons/translators/gif/GIFLoad.h b/src/add-ons/translators/gif/GIFLoad.h index 885364d835..a981b3f5b3 100644 --- a/src/add-ons/translators/gif/GIFLoad.h +++ b/src/add-ons/translators/gif/GIFLoad.h @@ -86,7 +86,7 @@ class GIFLoad { int fPass, fRow, fWidth, fHeight; unsigned char fOldCode[4096]; - int fOldCodeLength; + unsigned int fOldCodeLength; short fNewCode; int fBits, fMaxCode, fCodeSize; short fClearCode, fEndCode, fNextCode;