From 152d6338f8c084fe24ade7204a9e5b7b87eb8134 Mon Sep 17 00:00:00 2001 From: Murphy Berzish Date: Sun, 17 May 2020 21:07:51 -0500 Subject: [PATCH] fix hex digit radix in unicode escape (#4356) --- src/ast/seq_decl_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ast/seq_decl_plugin.cpp b/src/ast/seq_decl_plugin.cpp index 26c05faf4..356d77dde 100644 --- a/src/ast/seq_decl_plugin.cpp +++ b/src/ast/seq_decl_plugin.cpp @@ -87,7 +87,7 @@ static bool is_escape_char(char const *& s, unsigned& result) { result = 0; for (unsigned i = 0; i < 5; ++i) { if (is_hex_digit(*(s+3+i), d1)) { - result = 64*result + d1; + result = 16*result + d1; } else if (*(s+3+i) == '}') { s += 4 + i; @@ -104,7 +104,7 @@ static bool is_escape_char(char const *& s, unsigned& result) { unsigned i = 0; for (; i < 4; ++i) { if (is_hex_digit(*(s+3+i), d1)) { - result = 64*result + d1; + result = 16*result + d1; } else { break;