wok view tuxmath/stuff/SDL_extras.c.patch @ rev 13631

Up: grsync (1.2.2)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Nov 15 18:50:18 2012 +0100 (2012-11-15)
parents
children
line source
1 --- tuxmath_w_fonts-1.7.2/src/SDL_extras.c.old Mon Mar 9 10:44:42 2009
2 +++ tuxmath_w_fonts-1.7.2/src/SDL_extras.c Sat Jun 6 18:55:22 2009
3 @@ -987,6 +987,7 @@
4 /* font in memory once loaded until cleanup. */
5 static TTF_Font* get_font(int size)
6 {
7 + static char prev_font_name[FONT_NAME_LENGTH];
8 if (size < 0)
9 {
10 fprintf(stderr, "Error - requested font size %d is negative\n", size);
11 @@ -1001,7 +1002,7 @@
12 }
14 /* If the font has changed, we need to wipe out the old ones: */
15 - if (0 != strncmp(prev_font_name, Opts_FontName(),sizeof(prev_font_name)))
16 + if (0 != strncmp(prev_font_name, Opts_FontName(), FONT_NAME_LENGTH))
17 {
18 free_font_list();
19 strncpy(prev_font_name, Opts_FontName(), sizeof(prev_font_name));