mirror of
https://github.com/Z3Prover/z3
synced 2025-06-23 06:13:40 +00:00
fix hex digit radix in unicode escape (#4356)
This commit is contained in:
parent
1def58bc9f
commit
152d6338f8
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ static bool is_escape_char(char const *& s, unsigned& result) {
|
||||||
result = 0;
|
result = 0;
|
||||||
for (unsigned i = 0; i < 5; ++i) {
|
for (unsigned i = 0; i < 5; ++i) {
|
||||||
if (is_hex_digit(*(s+3+i), d1)) {
|
if (is_hex_digit(*(s+3+i), d1)) {
|
||||||
result = 64*result + d1;
|
result = 16*result + d1;
|
||||||
}
|
}
|
||||||
else if (*(s+3+i) == '}') {
|
else if (*(s+3+i) == '}') {
|
||||||
s += 4 + i;
|
s += 4 + i;
|
||||||
|
@ -104,7 +104,7 @@ static bool is_escape_char(char const *& s, unsigned& result) {
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
for (; i < 4; ++i) {
|
for (; i < 4; ++i) {
|
||||||
if (is_hex_digit(*(s+3+i), d1)) {
|
if (is_hex_digit(*(s+3+i), d1)) {
|
||||||
result = 64*result + d1;
|
result = 16*result + d1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue