Fix js_strtol

This commit is contained in:
Connor Nelson
2021-03-27 11:12:05 +01:00
committed by Tor Andersson
parent 72e95a48e3
commit f93d24539b
+1 -1
View File
@@ -31,7 +31,7 @@ double js_strtol(const char *s, char **p, int base)
double x;
int c;
if (base == 10)
for (x = 0, c = *s++; c - '0' < 10; c = *s++)
for (x = 0, c = *s++; (0 <= c - '0') && (c - '0' < 10); c = *s++)
x = x * 10 + (c - '0');
else
for (x = 0, c = *s++; table[c] < base; c = *s++)