Fix constant expression flagging in PDT evaluator.

This commit is contained in:
2023-04-04 20:49:46 +08:00
parent c98536e8ab
commit fd7c1e6635

View File

@@ -30,11 +30,10 @@ namespace Cryville.Common.Pdt {
_revokepttconst = false;
for (_rip = exp.Instructions.First; _rip != null; _rip = _rip.Next)
_rip.Value.Execute(this);
if (!Operate(target, _framecount, true)) return false;
if (exp.IsPotentialConstant) {
exp.IsConstant = exp.IsPotentialConstant = !_revokepttconst;
}
return true;
return Operate(target, _framecount, true);
}
/// <summary>
/// Patches an expression with a lefthand variable and a compound operator.