Berry fix json crash

This commit is contained in:
Stephan Hadinger 2022-08-31 19:21:00 +02:00
parent 5d63fc1cf0
commit a1e5f53ddd
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 */