mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- use iswspace to classify whitespace in V_BreakLines.
isspace does not work because it is limited to 8-bit character sets.
This commit is contained in:
parent
883a6ffe3a
commit
fd27b22857
1 changed files with 5 additions and 4 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include "v_text.h"
|
||||
|
||||
|
@ -387,7 +388,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const uint8_t *string, bo
|
|||
continue;
|
||||
}
|
||||
|
||||
if (isspace(c))
|
||||
if (iswspace(c))
|
||||
{
|
||||
if (!lastWasSpace)
|
||||
{
|
||||
|
@ -420,12 +421,12 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const uint8_t *string, bo
|
|||
start = space;
|
||||
space = NULL;
|
||||
|
||||
while (*start && isspace (*start) && *start != '\n')
|
||||
while (*start && iswspace (*start) && *start != '\n')
|
||||
start++;
|
||||
if (*start == '\n')
|
||||
start++;
|
||||
else
|
||||
while (*start && isspace (*start))
|
||||
while (*start && iswspace (*start))
|
||||
start++;
|
||||
string = start;
|
||||
}
|
||||
|
@ -443,7 +444,7 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const uint8_t *string, bo
|
|||
while (s < string)
|
||||
{
|
||||
// If there is any non-white space in the remainder of the string, add it.
|
||||
if (!isspace (*s++))
|
||||
if (!iswspace (*s++))
|
||||
{
|
||||
auto i = Lines.Reserve(1);
|
||||
breakit (&Lines[i], font, start, string, linecolor);
|
||||
|
|
Loading…
Reference in a new issue