]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fixed user font initialization writing beyond fonts array bounds.
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 17 Dec 2007 02:41:34 +0000 (02:41 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 17 Dec 2007 02:41:34 +0000 (02:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7806 d7cf8633-e32d-0410-b094-e92efae38249

gl_draw.c

index cace08b905ea8d18c7b898aeb79744c8e33a5938..de47e546cda71044e0c2c428afe645601be07a92 100644 (file)
--- 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++);
 }