From e45bcaf84bd787575a03d8346ae1fba1d9a56747 Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Sun, 18 Apr 2004 06:36:06 +0000 Subject: [PATCH] Fixed for 'space-at-end-of-string' font rendering crash. Added missing "blank," to usage printf() under WIN32. --- docs/CHANGES.txt | 3 +++ src/tuxpaint.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 336b7e0c9..6bd052eda 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -11,6 +11,9 @@ http://www.newbreedsoftware.com/tuxpaint/ * Updated Makefile for easier install. Mark K. Kim + * Fixed crash bug when translated text ends in a space. + Mark K. Kim & John Popplewell + * Vietnamese translation created. (Simple version) Le Quang Phan diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 7726b2382..d1778ca61 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -21,12 +21,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - June 14, 2002 - April 14, 2004 + June 14, 2002 - April 17, 2004 */ #define VER_VERSION "0.9.14" -#define VER_DATE "2004.04.14" +#define VER_DATE "2004.04.17" /* #define DEBUG */ @@ -3770,6 +3770,9 @@ void show_usage(FILE * f, char * prg) blank, blank, blank, blank, blank, blank, blank, blank, blank, +#ifdef WIN32 + blank, +#endif blank); free(blank); @@ -7469,6 +7472,8 @@ void wordwrap_text(TTF_Font * font, char * str, SDL_Color color, { text = TTF_RenderUTF8_Blended(locale_font, utf8_str, color); + if (!text) continue; /* Didn't render anything... */ + /* ----------- */ if (text->w > right - left) {