- 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 */
word_fits = TRUE;
if (!chars_fit)
; /* we pretend that it fits anyway */
word_fits = FALSE;
else if (*p == SPACE) /* chars_fit < *len_str so this is valid */
p--; /* the word just fitted */
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]));
}
/* If there was one or the first character didn't fit then */
/* If there was one. */
if (word_fits)
{
int next_is_space;