Don't generate op_inc whenever its used as an expression.

This commit is contained in:
Jeff Hutchinson 2021-09-07 19:43:39 -04:00
parent 9b2f4976c9
commit 55c0a748b4
2 changed files with 15 additions and 1 deletions

View file

@ -1083,7 +1083,7 @@ U32 AssignOpExprNode::compile(CodeStream& codeStream, U32 ip, TypeReq type)
bool oldVariables = arrayIndex || varName[0] == '$';
if (op == opPLUSPLUS && !oldVariables)
if (op == opPLUSPLUS && !oldVariables && type == TypeReqNone)
{
const S32 varIdx = getFuncVars(dbgLineNumber)->assign(varName, TypeReqFloat, dbgLineNumber);