- Patch by Henri Verbeet : Fix TEXT_WordBreak() when no characters fit.
- Sync port from wine.

svn path=/trunk/; revision=62486
This commit is contained in:
James Tabor 2014-03-13 01:36:31 +00:00
parent 6d582f3f95
commit fa0e017d2a

View file

@ -605,7 +605,7 @@ static void TEXT_WordBreak (HDC hdc, WCHAR *str, unsigned int max_str,
p = str + chars_fit; /* The character that doesn't fit */ p = str + chars_fit; /* The character that doesn't fit */
word_fits = TRUE; word_fits = TRUE;
if (!chars_fit) if (!chars_fit)
; /* we pretend that it fits anyway */ word_fits = FALSE;
else if (*p == SPACE) /* chars_fit < *len_str so this is valid */ else if (*p == SPACE) /* chars_fit < *len_str so this is valid */
p--; /* the word just fitted */ p--; /* the word just fitted */
else else
@ -615,7 +615,7 @@ static void TEXT_WordBreak (HDC hdc, WCHAR *str, unsigned int max_str,
; ;
word_fits = (p != str || *p == SPACE || IsCJKT(p[1])); word_fits = (p != str || *p == SPACE || IsCJKT(p[1]));
} }
/* If there was one or the first character didn't fit then */ /* If there was one. */
if (word_fits) if (word_fits)
{ {
int next_is_space; int next_is_space;