mirror of
https://github.com/reactos/reactos.git
synced 2024-10-24 23:11:33 +00:00
[User32]
- 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:
parent
6d582f3f95
commit
fa0e017d2a
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue