changeset 32787:d55d0bb7d00f

Reduce Fonts array to required size.
author ib
date Thu, 10 Feb 2011 11:47:29 +0000
parents 31f88a1387ad
children fb6f8ea9d38a
files gui/skin/font.c gui/skin/font.h
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/font.c	Thu Feb 10 11:35:32 2011 +0000
+++ b/gui/skin/font.c	Thu Feb 10 11:47:29 2011 +0000
@@ -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;
--- a/gui/skin/font.h	Thu Feb 10 11:35:32 2011 +0000
+++ b/gui/skin/font.h	Thu Feb 10 11:47:29 2011 +0000
@@ -47,7 +47,7 @@
  char            name[MAX_FONT_NAME];
 } bmpFont;
 
-extern bmpFont  * Fonts[MAX_FONTS + 1];
+extern bmpFont  * Fonts[MAX_FONTS];
 
 int  fntAddNewFont( char * name );
 void fntFreeFont( void );