Berry fix json crash

This commit is contained in:
Stephan Hadinger 2022-08-31 19:21:00 +02:00
parent 5d63fc1cf0
commit a1e5f53ddd

View File

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