File IO Problem

0.9.13 gives me data stream errors when loading very small BMP files.
The errors occur both in my own programs and in the test programs when I
use my bmps. The errors go away if I make the bmp slightly larger and
save in the exact same format in the same program. I’ve attached one of
the BMPs. This did not occur in 0.9.9.

Stuart
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 16_E.bmp
Type: image/x-ms-bmp
Size: 630 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/19990717/f8474900/attachment.bmp

0.9.13 gives me data stream errors when loading very small BMP files.
The errors occur both in my own programs and in the test programs when I
use my bmps. The errors go away if I make the bmp slightly larger and
save in the exact same format in the same program. I’ve attached one of
the BMPs. This did not occur in 0.9.9.

I found the problem. DirectX requires 8-byte padding of surface pitch in
some cases, and BMP files use 4-byte padding.

sigh

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

0.9.13 gives me data stream errors when loading very small BMP files.
The errors occur both in my own programs and in the test programs when I
use my bmps. The errors go away if I make the bmp slightly larger and
save in the exact same format in the same program. I’ve attached one of
the BMPs. This did not occur in 0.9.9.

The latest CVS snapshot should have this fixed, as well as the problem with
DirectX surfaces using odd widths like 642. I haven’t tested either fix, so
if there are problems, please let me know.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec