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

Up: seamonkey (2.5)
author Alexander Medvedev <devl547@gmail.com>
date Fri Nov 25 08:31:09 2011 +0000 (2011-11-25)
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));