* Source/Additions/Unicode.m: Move variable u to the correct scope

and initialize it.
This commit is contained in:
fredkiefer 2019-01-06 23:33:45 +01:00
parent 0c319ebc7e
commit a31506564e
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2019-01-06 Fred Kiefer <fredkiefer@gmx.de>
* Source/Additions/Unicode.m: Move variable u to the correct scope
and initialize it.
2019-01-06 Ivan Vucica <ivan@vucica.net>
* ANNOUNCE:

View file

@ -972,12 +972,12 @@ GSToUnicode(unichar **dst, unsigned int *size, const unsigned char *src,
{
case NSUTF8StringEncoding:
{
uint32_t u = 0;
#if defined(UTF8DECODE)
uint32_t state = 0;
#endif
while (spos < slen)
{
uint32_t u;
#if defined(UTF8DECODE)
if (decode(&state, &u, src[spos++]))
@ -1105,6 +1105,7 @@ GSToUnicode(unichar **dst, unsigned int *size, const unsigned char *src,
GROW();
}
ptr[dpos++] = ul + 0xdc00;
NSLog(@"Adding uh %d ul %d", uh + 0xd800, ul + 0xdc00);
}
}
#if defined(UTF8DECODE)