about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/math.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/math.c b/Src/math.c
index a2462a32e..eae283d19 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -1459,7 +1459,8 @@ mathparse(int pc)
 	case QUEST:
 	    if (stack[sp].val.type == MN_UNSET)
 		stack[sp].val = getmathparam(stack + sp);
-	    q = (stack[sp].val.type == MN_FLOAT) ? (zlong)stack[sp].val.u.d :
+	    q = (stack[sp].val.type == MN_FLOAT) ?
+		(stack[sp].val.u.d == 0 ? 0 : 1) :
 		stack[sp].val.u.l;
 
 	    if (!q)