mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-03-20 05:30:18 +00:00
Fix popping of lower priority expression term
This commit is contained in:
parent
8776d9010b
commit
c88c6affd7
@ -282,7 +282,7 @@ int parse_constexpr(long *value, int *size)
|
||||
if (scantoken == binary_ops_table[i])
|
||||
{
|
||||
matchop = 2;
|
||||
if (binary_ops_precedence[i] >= tos_op_prec(optos))
|
||||
while (binary_ops_precedence[i] >= tos_op_prec(optos))
|
||||
if (!calc_op(pop_op()))
|
||||
parse_error("Invalid binary operation");
|
||||
push_op(scantoken, binary_ops_precedence[i]);
|
||||
@ -719,7 +719,7 @@ t_opseq *parse_expr(t_opseq *codeseq, int *stackdepth)
|
||||
if (scantoken == binary_ops_table[i])
|
||||
{
|
||||
matchop = 2;
|
||||
if (binary_ops_precedence[i] >= tos_op_prec(optos))
|
||||
while (binary_ops_precedence[i] >= tos_op_prec(optos))
|
||||
{
|
||||
codeseq = gen_op(codeseq, pop_op());
|
||||
if (stackdepth)
|
||||
|
Loading…
x
Reference in New Issue
Block a user