[AD] [ alleg-Bugs-1842602 ] load_txt_font crashes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #1842602, was opened at 2007-12-02 10:51
Message generated for change (Comment added) made by elias
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=1842602&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christer Sandberg (chrisan)
Assigned to: Nobody/Anonymous (nobody)
Summary: load_txt_font crashes

Initial Comment:
When omitting the end of the glyph interval in the text file load_txt_font causes a segmentation fault. Content of font.txt:
prop_font_orig.bmp 0x20

Code:
#include <allegro.h>
int main(void)
{
   FONT *f;
   if (allegro_init() != 0) return 1;
   if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) != 0) return 1;
   f = load_txt_font("font.txt", NULL , NULL);
   return 0;
}
END_OF_MAIN()

Adding the end code 0xff in font.txt makes it load correctly and it also draws the glyphs in the entire interval correctly

Allegro 4.2.2
Ubuntu 7.04


----------------------------------------------------------------------

>Comment By: Elias Pschernig (elias)
Date: 2007-12-06 17:01

Message:
Logged In: YES 
user_id=32894
Originator: NO

According to
http://www.liballeg.org/stabledocs/en//alleg017.html#load_txt_font you
can't leave out the end glyph.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=1842602&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/