VarAction2: Fix jump insertion moving the end marker for another jump

This commit is contained in:
Jonathan G Rennison
2022-06-26 22:53:07 +01:00
parent 5b5fbaa476
commit 9775f468e8

View File

@@ -7635,6 +7635,10 @@ static void OptimiseVarAction2DeterministicSpriteGroupInsertJumps(DeterministicS
}
if (j < i - 1) {
DeterministicSpriteGroupAdjust current = adjust;
if (current.adjust_flags & DSGAF_END_BLOCK) {
/* Don't move the end block marker for another jump */
break;
}
current.operation = DSGA_OP_JZ;
current.adjust_flags &= ~(DSGAF_JUMP_INS_HINT | DSGAF_SKIP_ON_ZERO);
group->adjusts[i - 1].adjust_flags |= DSGAF_END_BLOCK;