diff --git a/code/nel/src/misc/bitmap_gif.cpp b/code/nel/src/misc/bitmap_gif.cpp index 5b964998a..653942d08 100644 --- a/code/nel/src/misc/bitmap_gif.cpp +++ b/code/nel/src/misc/bitmap_gif.cpp @@ -215,9 +215,6 @@ uint8 CBitmap::readGIF( NLMISC::IStream &f ) for (uint32 x = 0; x < width; x++) { - srcOffset++; - dstOffset+= dstChannels; - uint32 index = curFrame->RasterBits[srcOffset]; if ((sint32)index != transparency) @@ -250,6 +247,9 @@ uint8 CBitmap::readGIF( NLMISC::IStream &f ) _Data[0][dstOffset+1] = g; _Data[0][dstOffset+2] = b; _Data[0][dstOffset+3] = a; + + srcOffset++; + dstOffset+= dstChannels; } // x loop } // y loop } // pass loop @@ -262,9 +262,6 @@ uint8 CBitmap::readGIF( NLMISC::IStream &f ) uint32 dstOffset = (y + offset_y)*gif->SWidth*dstChannels + offset_x*dstChannels; for (uint32 x = 0; x < width; x++) { - srcOffset++; - dstOffset+= dstChannels; - uint32 index = curFrame->RasterBits[srcOffset]; if ((sint32)index != transparency) @@ -297,6 +294,9 @@ uint8 CBitmap::readGIF( NLMISC::IStream &f ) _Data[0][dstOffset+1] = g; _Data[0][dstOffset+2] = b; _Data[0][dstOffset+3] = a; + + srcOffset++; + dstOffset+= dstChannels; } // x loop } // y loop }