about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/math.c b/Src/math.c
index ce316414e..acf7bdd11 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -451,6 +451,10 @@ zzlex(void)
 		    int v;
 
 		    ptr++;
+		    if (!*ptr) {
+			zerr("character missing after ##", NULL, 0);
+			return EOI;
+		    }
 		    ptr = getkeystring(ptr, NULL, 6, &v);
 		    yyval.u.l = v;
 		    return NUM;