diff --git "a/win32ss/user/rtl/text.c" "b/win32ss/user/rtl/text.c" index ac12626796b..8935d1cf48d 100644 --- "a/win32ss/user/rtl/text.c" +++ "b/win32ss/user/rtl/text.c" @@ -669,6 +669,7 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, int tabwidth, int *pprefix_offset, ellipsis_data *pellip) { + /* This is mostly from Wine's dll/user32/text.c's TEXT_NextLineW function */ int i = 0, j = 0; int plen = 0; SIZE size = {0, 0}; @@ -765,7 +766,8 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count, * several bugs in the Microsoft versions). */ word_broken = 0; - line_fits = (num_fit >= j_in_seg); + /* CORE-15678 - "+ 1" allows num_fit a bit more room for ReactOS */ + line_fits = (num_fit + 1 >= j_in_seg); if (!line_fits && (format & DT_WORDBREAK)) { const WCHAR *s;