From fa0e017d2ac0a9b182709093f5d7649023581d6f Mon Sep 17 00:00:00 2001 From: James Tabor Date: Thu, 13 Mar 2014 01:36:31 +0000 Subject: [PATCH] [User32] - Patch by Henri Verbeet : Fix TEXT_WordBreak() when no characters fit. - Sync port from wine. svn path=/trunk/; revision=62486 --- reactos/win32ss/user/user32/windows/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/win32ss/user/user32/windows/font.c b/reactos/win32ss/user/user32/windows/font.c index 96b50d85b0c..7b5e1431f0d 100644 --- a/reactos/win32ss/user/user32/windows/font.c +++ b/reactos/win32ss/user/user32/windows/font.c @@ -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;