wrong code in "ilReadRLE4Bmp"?
A full featured cross-platform image library
Brought to you by:
doomwiz
----------------code---------------- in 'ilReadRLE4Bmp()' @ il_bmp.c
...
count = IL_MIN (Bytes[1], iCurImage->SizeOfData-offset);
for (i = 0; i < count; i++) {
int byte;
if ((i & 0x01) == 0) {
if (iread(&Bytes[0], sizeof(Bytes[0]), 1) != 1)
return IL_FALSE;
byte = (Bytes[0] >> 4);
}
else
byte = (Bytes[0] & 0x0F);
iCurImage->Data[offset++] = byte;
}
align = Bytes[1] % 4; // 'Bytes[1]' should be changed to 'count' ? <<<<<<<<<<<<<<<
if (align == 1 || align == 2) // Must be on a word boundary
if (iread(&Bytes[0], sizeof(Bytes[0]), 1) != 1)
return IL_FALSE;
...
----------------code----------------
as I commented, thanks
-- tsuui
this is found under revision 1678, in file 'il_bmp.c'