Fixed bug where textdir() didn't return a valid string for normal text! (D'oh!)
This commit is contained in:
parent
6d280cbc4d
commit
18a1b87b70
2 changed files with 16 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ bill@newbreedsoftware.com
|
|||
http://www.newbreedsoftware.com/tuxpaint/
|
||||
|
||||
|
||||
2003.May.23 (0.9.11) [cvs]
|
||||
2003.Jun.14 (0.9.11) [cvs]
|
||||
* Windows bugfixes.
|
||||
John Popplewell <john@johnnypops.demon.co.uk>
|
||||
|
||||
|
|
@ -62,6 +62,7 @@ http://www.newbreedsoftware.com/tuxpaint/
|
|||
* When a locale requiring its own font can't be used because the font
|
||||
is missing, Tux Paint STILL didn't work right. Fixed. (Set $LC_ALL=C)
|
||||
|
||||
* Added a set of square brushes (similar to the various round ones).
|
||||
|
||||
|
||||
2003.February.22 (0.9.10)
|
||||
|
|
|
|||
|
|
@ -6370,7 +6370,7 @@ void wordwrap_text(TTF_Font * font, char * str, SDL_Color color,
|
|||
(need_utf8(language) && strcmp(gettext(str), str) != 0)))
|
||||
{
|
||||
if (want_utf8 || want_right_to_left == 0)
|
||||
locale_str = strdup(str);
|
||||
locale_str = strdup(gettext(str));
|
||||
else
|
||||
locale_str = strdup(textdir(gettext(str)));
|
||||
|
||||
|
|
@ -6552,7 +6552,7 @@ void wordwrap_text(TTF_Font * font, char * str, SDL_Color color,
|
|||
strcmp(gettext(str), str) != 0 && strcmp(str, "") != 0)
|
||||
{
|
||||
if (want_right_to_left == 0)
|
||||
locale_str = strdup(str);
|
||||
locale_str = strdup(gettext(str));
|
||||
else
|
||||
locale_str = strdup(textdir(gettext(str)));
|
||||
|
||||
|
|
@ -10233,6 +10233,10 @@ unsigned char * textdir(unsigned char * str)
|
|||
unsigned char * dstr;
|
||||
int i, j;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("ORIG_DIR: %s\n", str);
|
||||
#endif
|
||||
|
||||
dstr = (unsigned char *) malloc((strlen(str) + 5) * sizeof(unsigned char));
|
||||
|
||||
if (need_right_to_left(language))
|
||||
|
|
@ -10270,6 +10274,14 @@ unsigned char * textdir(unsigned char * str)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(dstr, str);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("L2R_DIR: %s\n", dstr);
|
||||
#endif
|
||||
|
||||
return (dstr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue