wok view tuxmath/stuff/SDL_extras.c.patch @ rev 23406
updated perl-text-template (1.44 -> 1.58)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Apr 01 06:37:49 2020 +0100 (2020-04-01) |
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));