#33 wrong buffer size on ilSaveL with IL_BMP

closed-accepted
None
5
2007-01-24
2007-01-24
Anonymous
No

the return value should correspond to the actual size of the data.
however the result is always '6'.

this is caused by writing the filesize in the end (at pos 2)

pos2 + 4 byte = 6 (the returned size)

the return value is determined by itellw = iTellLumpW = Lumppos (which is 6 after writing the filesize at pos2)

quick fix:

@@ -1012,6 +1012,8 @@
if (TempImage != iCurImage)
ilCloseImage(TempImage);

+ iseekw(FileSize, IL_SEEK_SET);
+
return IL_TRUE;
}

have a nice day
raphael

Discussion

  • Nobody/Anonymous

    Logged In: NO

    forgot to add

    file: il_bmp.c
    func: iSaveBitmapInternal()

     
  • Anonymous

    Anonymous - 2007-01-24
    • assigned_to: nobody --> darkyojimbo
    • status: open --> closed-accepted
     

Log in to post a comment.