1. Re: Nim's Win32 Bug
I *think* I found the bug in Davi Figueiredo's Nin program.
I tried running it under NT the other day, and got an error from LoadBitmap
- NT apparently doesn't support that option.
I had already written a routine to load bitmaps "the hard way", so I started
reworking it so I could load bitmaps files under NT. Much to my suprise, it
reported an error when attempting to load the bitmaps from the Nim game.
Apparently, it was hitting an EOF too soon.
I tried saving one of the "bad" bitmaps in Paint, and it loaded just fine.
Running FC on the files showed there was only a single byte different
between the two of them - the 4th byte. In the bitmap I could not load, the
beginning of the file looked like:
{ 'B', 'M', 54, 180, 0, 0, ...
The bitmap saved by Paint, on the other hand, had the header:
{ 'B', 'M', 54, 20, 0, 0, ...
The bitmap file header layout begins:
bfType 2 bytes 'BM'
bfSize DWORD
For the file I couldn't read, the bfSize was reported as 46134 bytes. The
correct value should have been 5,174 bytes - the same as the file size.
My guess is that the bug he is experiencing is a result of the corrupt
header.
-- David Cuny