# HG changeset patch # User pontscho # Date 1014579292 0 # Node ID ad868aae2a5c0fa90a328e8d8483ab343421259b # Parent 75f2935e998425deb641e1f0fdb1294215a03a63 fix playtree bug. but ... i dont' see this ... bazmeg diff -r 75f2935e9984 -r ad868aae2a5c Gui/interface.h --- a/Gui/interface.h Sun Feb 24 18:31:14 2002 +0000 +++ b/Gui/interface.h Sun Feb 24 19:34:52 2002 +0000 @@ -100,8 +100,9 @@ extern void guiGetEvent( int type,char * arg ); extern void guiEventHandling( void ); -#define guiSetFilename( s,n ) \ - { if ( s ) free( s ); s=NULL; s=strdup( n ); } +#define gstrdup( s,ss ) { s=malloc( strlen( ss ) + 3 ); strcpy( s,ss ); } + +#define guiSetFilename( s,n ) { s=strdup( n ); } #define guiSetDF( s,d,n ) \ { \ @@ -110,4 +111,4 @@ sprintf( s,"%s/%s",d,n ); \ } -#endif \ No newline at end of file +#endif diff -r 75f2935e9984 -r ad868aae2a5c Gui/skin/font.c --- a/Gui/skin/font.c Sun Feb 24 18:31:14 2002 +0000 +++ b/Gui/skin/font.c Sun Feb 24 19:34:52 2002 +0000 @@ -121,6 +121,7 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... ) { txSample * tmp = NULL; + txSample tmp2; char p[512]; va_list ap; unsigned long * ibuf; @@ -147,7 +148,7 @@ ibuf=(unsigned long *)Fonts[id]->Bitmap.Image; for ( i=0;i < (int)strlen( p );i++ ) { - int c = (int)p[i]; + char c = p[i]; if ( Fonts[id]->Fnt[c].x == -1 ) c=32; for ( oy=0,y=Fonts[id]->Fnt[c].y;y < Fonts[id]->Fnt[c].y + Fonts[id]->Fnt[c].sy; y++,oy++ ) for ( ox=0,x=Fonts[id]->Fnt[c].x;x < Fonts[id]->Fnt[c].x + Fonts[id]->Fnt[c].sx; x++,ox++ ) @@ -159,7 +160,6 @@ if ( ( sx > 0 )&&( sx < tmp->Width ) ) { - txSample tmp2; tmp2.ImageSize=sx * tmp->Height * 4; if ( ( tmp2.Image=malloc( tmp2.ImageSize ) ) == NULL ) { free( tmp->Image ); return NULL; }