mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
json: fix high surrogate escapes
Surrogate escapes must add not or 0x10000, as the specified bits go up 0xfffff.
This commit is contained in:
parent
7002fe8ac3
commit
bb54e32e8a
1 changed files with 1 additions and 1 deletions
|
|
@ -372,7 +372,7 @@ static inline int spa_json_parse_stringn(const char *val, int len, char *result,
|
||||||
v < 0xdc00 || v > 0xdfff)
|
v < 0xdc00 || v > 0xdfff)
|
||||||
continue;
|
continue;
|
||||||
p += 6;
|
p += 6;
|
||||||
cp = 0x010000 | ((cp & 0x3ff) << 10) | (v & 0x3ff);
|
cp = 0x010000 + (((cp & 0x3ff) << 10) | (v & 0x3ff));
|
||||||
} else if (cp >= 0xdc00 && cp <= 0xdfff)
|
} else if (cp >= 0xdc00 && cp <= 0xdfff)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue