1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Value lifetime fix for chained conditionals

This commit is contained in:
Brian Fiete 2020-12-23 15:56:43 -08:00
parent 21798e20f9
commit e8de8cd7be
2 changed files with 34 additions and 1 deletions

View file

@ -7857,7 +7857,7 @@ BF_NOINLINE void BfModule::EvaluateWithNewScope(BfExprEvaluator& exprEvaluator,
newScope.mOuterIsConditional = true;
newScope.mAllowTargeting = false;
mCurMethodState->AddScope(&newScope);
NewScopeState();
NewScopeState(true, false);
exprEvaluator.mBfEvalExprFlags = (BfEvalExprFlags)(exprEvaluator.mBfEvalExprFlags | flags);
exprEvaluator.Evaluate(expr, (flags & BfEvalExprFlags_PropogateNullConditional) != 0, (flags & BfEvalExprFlags_IgnoreNullConditional) != 0, (flags & BfEvalExprFlags_AllowSplat) != 0);
RestoreScopeState();