about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/math.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/math.c b/Src/math.c
index 17796f244..e87a286fb 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -383,9 +383,10 @@ zzlex(void)
 		return NUM;
 	    }
 	    else if (isset(OCTALZEROES) &&
-		    (memchr(ptr, '.', strlen(ptr)) == NULL)) {
+		    (memchr(ptr, '.', strlen(ptr)) == NULL) &&
+		     idigit(*ptr)) {
 	        yyval.u.l = zstrtol(ptr, &ptr, lastbase = 8);
-	        return NUM;
+		return NUM;
 	    }
 	/* Fall through! */
 	default: