1
0
mirror of synced 2024-11-28 09:30:51 +01:00

patterns: Properly reset back current control flow type in arrays

Fixes issue mentioned in #460
This commit is contained in:
WerWolv 2022-03-01 20:57:21 +01:00
parent 61d9918dae
commit cc59b36c54

View File

@ -215,6 +215,7 @@ namespace hex::pl {
addEntries(std::move(patterns));
auto ctrlFlow = evaluator->getCurrentControlFlowStatement();
evaluator->setCurrentControlFlowStatement(ControlFlowStatement::None);
if (ctrlFlow == ControlFlowStatement::Break)
break;
else if (ctrlFlow == ControlFlowStatement::Continue) {
@ -238,6 +239,7 @@ namespace hex::pl {
addEntries(std::move(patterns));
auto ctrlFlow = evaluator->getCurrentControlFlowStatement();
evaluator->setCurrentControlFlowStatement(ControlFlowStatement::None);
if (ctrlFlow == ControlFlowStatement::Break)
break;
else if (ctrlFlow == ControlFlowStatement::Continue) {
@ -284,6 +286,7 @@ namespace hex::pl {
}
auto ctrlFlow = evaluator->getCurrentControlFlowStatement();
evaluator->setCurrentControlFlowStatement(ControlFlowStatement::None);
if (ctrlFlow == ControlFlowStatement::Break)
break;
else if (ctrlFlow == ControlFlowStatement::Continue) {