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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Src/math.c b/Src/math.c
index 7eec82e63..5b2357c74 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -37,6 +37,11 @@
 /**/
 int noeval;
  
+/* integer zero */
+
+/**/
+mnumber zero_mnumber;
+
 /* last input base we used */
 
 /**/
@@ -1018,13 +1023,13 @@ mathparse(int pc)
 	    push(yyval, NULL);
 	    break;
 	case ID:
-	    push(getnparam(yylval), yylval);
+	    push((noeval ? zero_mnumber : getnparam(yylval)), yylval);
 	    break;
 	case CID:
-	    push(getcvar(yylval), yylval);
+	    push((noeval ? zero_mnumber : getcvar(yylval)), yylval);
 	    break;
 	case FUNC:
-	    push(callmathfunc(yylval), yylval);
+	    push((noeval ? zero_mnumber : callmathfunc(yylval)), yylval);
 	    break;
 	case M_INPAR:
 	    mathparse(TOPPREC);