[MPlayer-cvslog] r32874 - in trunk/gui/skin: font.c font.h

ib subversion at mplayerhq.hu
Thu Feb 10 12:47:29 CET 2011


Author: ib
Date: Thu Feb 10 12:47:29 2011
New Revision: 32874

Log:
Reduce Fonts array to required size.

Modified:
   trunk/gui/skin/font.c
   trunk/gui/skin/font.h

Modified: trunk/gui/skin/font.c
==============================================================================
--- trunk/gui/skin/font.c	Thu Feb 10 12:35:32 2011	(r32873)
+++ trunk/gui/skin/font.c	Thu Feb 10 12:47:29 2011	(r32874)
@@ -26,14 +26,14 @@
 #include "mp_msg.h"
 #include "libavutil/avstring.h"
 
-bmpFont * Fonts[MAX_FONTS + 1] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL };
+bmpFont * Fonts[MAX_FONTS] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL };
 
 int fntAddNewFont( char * name )
 {
  int id;
  int i;
 
- for( id=0;id<MAX_FONTS + 1;id++ )
+ for( id=0;id<MAX_FONTS;id++ )
    if ( !Fonts[id] ) break;
 
  if ( id == MAX_FONTS ) return -2;

Modified: trunk/gui/skin/font.h
==============================================================================
--- trunk/gui/skin/font.h	Thu Feb 10 12:35:32 2011	(r32873)
+++ trunk/gui/skin/font.h	Thu Feb 10 12:47:29 2011	(r32874)
@@ -47,7 +47,7 @@ typedef struct
  char            name[MAX_FONT_NAME];
 } bmpFont;
 
-extern bmpFont  * Fonts[MAX_FONTS + 1];
+extern bmpFont  * Fonts[MAX_FONTS];
 
 int  fntAddNewFont( char * name );
 void fntFreeFont( void );


More information about the MPlayer-cvslog mailing list