Unified · Split
| @@ -360,7 +360,7 @@ void cstr_u8cat(CString *cstr, int ch) · 359 unmodified lines | |||
| 360 | { | 360 | { |
| 361 | unsigned char buf[4]; | 361 | unsigned char buf[4]; |
| 362 | int size; | 362 | int size; |
| 363 | int add = (int)((unsigned char*)unicode_to_utf8(&buf[0],(uint32_t)ch) - &buf[0]); | 363 | int add = (int)((unsigned char*)unicode_to_utf8((char *)&buf[0],(uint32_t)ch) - &buf[0]); |
| 364 | unsigned char *p,*b=buf; | 364 | unsigned char *p,*b=buf; |
| 365 | size = cstr->size + add; | 365 | size = cstr->size + add; |
| 366 | if (size > cstr->size_allocated) | 366 | if (size > cstr->size_allocated) |
| @@ -2125,13 +2125,13 @@ static void parse_escape_string(CString *outstr, const uint8_t *buf, int is_long · 1758 unmodified lines | |||
| 2125 | } | 2125 | } |
| 2126 | c = n; | 2126 | c = n; |
| 2127 | goto add_char_nonext; | 2127 | goto add_char_nonext; |
| 2128 | case 'x': { unsigned ucn_chars_nr = -1u; goto parse_hex_or_ucn; | 2128 | case 'x': { unsigned int i; unsigned ucn_chars_nr = -1u; goto parse_hex_or_ucn; |
| 2129 | case 'u': ucn_chars_nr = 4; goto parse_hex_or_ucn; | 2129 | case 'u': ucn_chars_nr = 4; goto parse_hex_or_ucn; |
| 2130 | case 'U': ucn_chars_nr = 8; goto parse_hex_or_ucn; | 2130 | case 'U': ucn_chars_nr = 8; goto parse_hex_or_ucn; |
| 2131 | parse_hex_or_ucn:; | 2131 | parse_hex_or_ucn:; |
| 2132 | p++; | 2132 | p++; |
| 2133 | n = 0; | 2133 | n = 0; |
| 2134 | for(unsigned i=1;i<=ucn_chars_nr;i++) { | 2134 | for(i=1;i<=ucn_chars_nr;i++) { |
| 2135 | c = *p; | 2135 | c = *p; |
| 2136 | if (c >= 'a' && c <= 'f') | 2136 | if (c >= 'a' && c <= 'f') |
| 2137 | c = c - 'a' + 10; | 2137 | c = c - 'a' + 10; |