From 805b3bbb88f8a9b0f67134a5ce77956621571bbd Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 14 May 2019 08:44:18 -0400 Subject: [PATCH] Numbers require at least 1 significant digit. Address issue #96 --- src/core/strtod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/strtod.c b/src/core/strtod.c index b32d3a44..590947d1 100644 --- a/src/core/strtod.c +++ b/src/core/strtod.c @@ -291,8 +291,9 @@ int janet_scan_number( if (*str == '.') { if (seenpoint) goto error; seenpoint = 1; + } else { + seenadigit = 1; } - seenadigit = 1; str++; }