Mercurial > mplayer.hg
changeset 32837:0501ab77f5e2
Revert r32923: none of the systems known or tested have a problem in it.
author | ib |
---|---|
date | Thu, 17 Feb 2011 23:39:29 +0000 |
parents | 2af511e2575e |
children | 95465a2dec73 |
files | gui/skin/font.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/skin/font.c Thu Feb 17 15:06:37 2011 +0000 +++ b/gui/skin/font.c Thu Feb 17 23:39:29 2011 +0000 @@ -32,16 +32,14 @@ int fntAddNewFont( char * name ) { int id, i; - bmpFont init = {0}; for( id=0;id<MAX_FONTS;id++ ) if ( !Fonts[id] ) break; if ( id == MAX_FONTS ) return -2; - if ( ( Fonts[id]=malloc( sizeof( bmpFont ) ) ) == NULL ) return -1; + if ( ( Fonts[id]=calloc( 1,sizeof( *Fonts[id] ) ) ) == NULL ) return -1; - *Fonts[id] = init; av_strlcpy( Fonts[id]->name,name,MAX_FONT_NAME ); for ( i=0;i<ASCII_CHRS+EXTRA_CHRS;i++ ) Fonts[id]->Fnt[i].x=Fonts[id]->Fnt[i].y=Fonts[id]->Fnt[i].sx=Fonts[id]->Fnt[i].sy=-1;