wok annotate tuxmath/stuff/SDL_extras.c.patch @ rev 23474
updated python-cssselect (0.7.1 -> 1.1.0)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Apr 05 14:56:27 2020 +0100 (2020-04-05) |
parents | |
children |
rev | line source |
---|---|
claudinei@3314 | 1 --- tuxmath_w_fonts-1.7.2/src/SDL_extras.c.old Mon Mar 9 10:44:42 2009 |
claudinei@3314 | 2 +++ tuxmath_w_fonts-1.7.2/src/SDL_extras.c Sat Jun 6 18:55:22 2009 |
claudinei@3314 | 3 @@ -987,6 +987,7 @@ |
claudinei@3314 | 4 /* font in memory once loaded until cleanup. */ |
claudinei@3314 | 5 static TTF_Font* get_font(int size) |
claudinei@3314 | 6 { |
claudinei@3314 | 7 + static char prev_font_name[FONT_NAME_LENGTH]; |
claudinei@3314 | 8 if (size < 0) |
claudinei@3314 | 9 { |
claudinei@3314 | 10 fprintf(stderr, "Error - requested font size %d is negative\n", size); |
claudinei@3314 | 11 @@ -1001,7 +1002,7 @@ |
claudinei@3314 | 12 } |
claudinei@3314 | 13 |
claudinei@3314 | 14 /* If the font has changed, we need to wipe out the old ones: */ |
claudinei@3314 | 15 - if (0 != strncmp(prev_font_name, Opts_FontName(),sizeof(prev_font_name))) |
claudinei@3314 | 16 + if (0 != strncmp(prev_font_name, Opts_FontName(), FONT_NAME_LENGTH)) |
claudinei@3314 | 17 { |
claudinei@3314 | 18 free_font_list(); |
claudinei@3314 | 19 strncpy(prev_font_name, Opts_FontName(), sizeof(prev_font_name)); |