diff options
Diffstat (limited to 'lib/quickjs')
-rw-r--r-- | lib/quickjs/quickjs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/quickjs/quickjs.c b/lib/quickjs/quickjs.c index 1fb0f824..0da7e13f 100644 --- a/lib/quickjs/quickjs.c +++ b/lib/quickjs/quickjs.c @@ -10407,7 +10407,8 @@ static JSValue js_atof(JSContext *ctx, const char *str, const char **pp, p++; } if (!(flags & ATOD_INT_ONLY)) { - if (*p == '.' && (p > p_start || to_digit((uint8_t)p[1]) < radix)) { + if (*p == '.' && radix == 10 && + (p > p_start || to_digit((uint8_t)p[1]) < radix)) { is_float = TRUE; p++; if (*p == sep) |