1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-28 06:49:49 +02:00

17175: Src/math.c: didn't handle parameters before a ternary expression

properly.
This commit is contained in:
Peter Stephenson 2002-05-17 15:14:03 +00:00
parent dbe104ca8c
commit cd3578ed94
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-05-17 Peter Stephenson <pws@csr.com>
* 17175: Src/math.c: didn't handle parameters before a ternary
expression properly.
2002-05-16 Peter Stephenson <pws@csr.com>
* 17171: Src/Modules/tcp.c: ztcp didn't return status 1 when a

View File

@ -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;