3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 03:07:07 +00:00

fix hex digit radix in unicode escape (#4356)

This commit is contained in:
Murphy Berzish 2020-05-17 21:07:51 -05:00 committed by GitHub
parent 1def58bc9f
commit 152d6338f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;