Skip to content

ACT1Q4_SetMonolithOrder has incorrect increment condition. #224

Description

@Necrolis

for (int32_t i = 0; i < 5; ++i)

The increment condition should only trigger if a stone was successfully placed, otherwise this will create orderings with holes.
Using the 1.10 asm to verify;

jump condition:

6FC99F35  |.  66:833C73 00 |CMP WORD PTR [EBX+ESI*2],0
6FC99F3A  |.  75 3C             |JNZ SHORT D2Game.6FC99F78

loop epilogue:

6FC99F6E |.  66:8B54AC 14       |MOV DX,WORD PTR [ESP+EBP*4+14]
6FC99F73 |.  45                         |INC EBP
6FC99F74 |.  66:891473            |MOV WORD PTR [EBX+ESI*2],DX
6FC99F78 |>  83FD 05              |CMP EBP,5
6FC99F7B |.^ 7C 96                  \JL SHORT D2Game.6FC99F13

note the target of the jump is after the counter increment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions