The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: kniederk on May 25, 2010, 09:24:40 AM

Title: fclose missing in font.cc
Post by: kniederk on May 25, 2010, 09:24:40 AM
I believe that there is an fclose(f) missing in "font.cc" towards the end.   In practice this isn't very serious, because the case corresponds to a failure of reading the font, and in that case program execution is halted anyway, but I think it should still be added. 

Klaus


       if (dsp_read_bdf_font(f, fnt)) {
                fprintf(stderr, "Loading BDF font %s with %i characters\n", fname, fnt->num_chars);
                fclose(f);
                return true;
        }
---->>> add fclose(f) here ?
        return false;
Title: Re: fclose missing in font.cc
Post by: Dwachs on May 27, 2010, 07:11:10 AM
thank you for spotting this out.