Re: Bug in read_bitmap?
- Posted by "Graeme." <hmi at POWERUP.COM.AU> Jun 18, 1998
- 675 views
At 05:58 PM 6/17/98 +0200, Jesus wrote: >I'm trying to read a lot of bitmaps from disk with "read_bitmap". >After reading ten (10) of them, I get an error telling I've open too many >files. >Does anybody know if read_bitmap does close the bitmap after reading it?. Yes, read bitmap closes the file after reading it, however it appears it dosn't close the file after NOT reading it (i.e. when returning an unsupported format error). The fix is simple; insert "close(fn)" before each of the "return BMP_UNSUPPORTED_FORMAT" lines in the read_bitmap() function, in image.e I wonder how this one slipped through after so long? Graeme. ----------------------------------------------------