From 8ac9b148d1528b0d17432a8772afc4fde26d017e Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Fri, 29 Aug 2025 20:55:58 +0200 Subject: [PATCH] Fix OP_*_STORE precedence --- engine/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/compiler.c b/engine/compiler.c index d1c2acc..d65fb79 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -4720,7 +4720,7 @@ static sxi32 PH7_GenStateEmitExprCode( } else if(iVmOp == PH7_OP_LOR) { /* Emit the true jump so we can short-circuit the logical or*/ PH7_VmEmitInstr(pGen->pVm, pGen->pIn->nLine, PH7_OP_JMPNZ, 1/* Keep the value on the stack */, 0, 0, &nJmpIdx); - } else if(pNode->pOp->iPrec == 18 /* Combined binary operators [i.e: =,'.=','+=',*=' ...] precedence */) { + } else if(pNode->pOp->iPrec == 20 /* Combined binary operators [i.e: =,'.=','+=',*=' ...] precedence */) { iFlags |= EXPR_FLAG_LOAD_IDX_STORE; } rc = PH7_GenStateEmitExprCode(&(*pGen), pNode->pRight, iFlags);