From 14cf5dab5e4ead28d1e2900104dbde945c53a308 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Thu, 23 Nov 2023 08:46:31 +1000 Subject: [PATCH] Fix parsing of surrogate pairs with \u --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 057650af1..569dc6df7 100644 --- a/src/parser.c +++ b/src/parser.c @@ -2087,7 +2087,7 @@ static int get_escape(parser *p, const char **_src, bool *error, bool number) if (ch == 'x') ch = get_hex(&src, UINT_MAX, error); - else if ((ch == 'U') && p->flags.json) { + else if (ch == 'U') { ch = get_hex(&src, 8, error); unicode = true; } else if (ch == 'u') {