Merge pull request #16399 from s-hadinger/berry_fix_json_crash

Berry fix json crash
This commit is contained in:
s-hadinger 2022-08-31 19:34:44 +02:00 committed by GitHub
commit 5a103505ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -263,6 +263,9 @@ BERRY_API bint be_str2int(const char *str, const char **endstr)
while ((c = be_char2hex(*str++)) >= 0) {
sum = sum * 16 + c;
}
if (endstr) {
*endstr = str - 1;
}
return sum;
} else {
/* decimal literal */