about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-05-17 15:14:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-05-17 15:14:03 +0000
commitcd3578ed9434868fab8da3031e83de5017332205 (patch)
tree5f43853ae9d72f8e5098cf3c3896389dc4e9e375 /Src/math.c
parentdbe104ca8caa087e889ee83126f99c63110b9482 (diff)
downloadzsh-cd3578ed9434868fab8da3031e83de5017332205.tar.gz
zsh-cd3578ed9434868fab8da3031e83de5017332205.tar.xz
zsh-cd3578ed9434868fab8da3031e83de5017332205.zip
17175: Src/math.c: didn't handle parameters before a ternary expression
properly.
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/math.c b/Src/math.c
index e87a286fb..344670d6e 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -1109,6 +1109,8 @@ mathparse(int pc)
 	    }
 	    break;
 	case QUEST:
+	    if (stack[sp].val.type == MN_UNSET)
+		stack[sp].val = getnparam(stack[sp].lval);
 	    q = (stack[sp].val.type == MN_FLOAT) ? (zlong)stack[sp].val.u.d :
 		stack[sp].val.u.l;