Init RPN expressions created by binary operators

This commit is contained in:
ISSOtm
2020-01-21 00:25:18 +01:00
parent 4e8b34f42e
commit d466cab1e8

View File

@@ -333,6 +333,8 @@ void rpn_BinaryOp(enum RPNCommand op, struct Expression *expr,
/* First, check if the expression is known */
expr->isKnown = src1->isKnown && src2->isKnown;
if (expr->isKnown) {
rpn_Init(expr); /* Init the expression to something sane */
/* If both expressions are known, just compute the value */
uint32_t uleft = src1->nVal, uright = src2->nVal;