From: res Date: Mon, 17 Dec 2007 02:41:34 +0000 (+0000) Subject: Fixed user font initialization writing beyond fonts array bounds. X-Git-Tag: xonotic-v0.1.0preview~2685 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6f774bae7c7228e8940bdce58b8caee450dbd24b;p=xonotic%2Fdarkplaces.git Fixed user font initialization writing beyond fonts array bounds. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7806 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_draw.c b/gl_draw.c index cace08b9..de47e546 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -726,7 +726,7 @@ void GL_Draw_Init (void) strlcpy(FONT_CENTERPRINT->title, "centerprint", sizeof(FONT_CENTERPRINT->title)); strlcpy(FONT_INFOBAR->title, "infobar", sizeof(FONT_INFOBAR->title)); strlcpy(FONT_MENU->title, "menu", sizeof(FONT_MENU->title)); - for(i = 0, j = 0; i < MAX_FONTS; ++i) + for(i = 0, j = 0; i < MAX_USERFONTS; ++i) if(!FONT_USER[i].title[0]) dpsnprintf(FONT_USER[i].title, sizeof(FONT_USER[i].title), "user%d", j++); }