Fix wchar_t strings with 'x', 'u' and 'U'
This commit is contained in:
parent
8b906427e3
commit
b7733aeef1
1 changed files with 7 additions and 4 deletions
11
tccpp.c
11
tccpp.c
|
@ -2163,13 +2163,16 @@ static void parse_escape_string(CString *outstr, const uint8_t *buf, int is_long
|
||||||
c = c - '0';
|
c = c - '0';
|
||||||
else if (i > 0)
|
else if (i > 0)
|
||||||
expect("more hex digits in universal-character-name");
|
expect("more hex digits in universal-character-name");
|
||||||
else {
|
else
|
||||||
c = n;
|
goto add_hex_or_ucn;
|
||||||
goto add_char_nonext;
|
|
||||||
}
|
|
||||||
n = n * 16 + c;
|
n = n * 16 + c;
|
||||||
p++;
|
p++;
|
||||||
} while (--i);
|
} while (--i);
|
||||||
|
if (is_long) {
|
||||||
|
add_hex_or_ucn:
|
||||||
|
c = n;
|
||||||
|
goto add_char_nonext;
|
||||||
|
}
|
||||||
cstr_u8cat(outstr, n);
|
cstr_u8cat(outstr, n);
|
||||||
continue;
|
continue;
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|
Loading…
Reference in a new issue