mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
throw less #5519
This commit is contained in:
parent
af5c6e43b9
commit
20a259cfaa
|
@ -43,9 +43,9 @@ bool zstring::is_escape_char(char const *& s, unsigned& result) {
|
|||
}
|
||||
else if (*(s+3+i) == '}') {
|
||||
if (result > 255 && !uses_unicode())
|
||||
throw default_exception("unicode characters outside of byte range are not supported");
|
||||
if (result > unicode_max_char())
|
||||
throw default_exception("unicode characters outside of byte range are not supported");
|
||||
return false;
|
||||
if (result > unicode_max_char())
|
||||
return false;
|
||||
s += 4 + i;
|
||||
return true;
|
||||
}
|
||||
|
@ -65,8 +65,8 @@ bool zstring::is_escape_char(char const *& s, unsigned& result) {
|
|||
result = 16*result + d2;
|
||||
result = 16*result + d3;
|
||||
result = 16*result + d4;
|
||||
if (result > unicode_max_char())
|
||||
throw default_exception("unicode characters outside of byte range are not supported");
|
||||
if (result > unicode_max_char())
|
||||
return false;
|
||||
s += 6;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue