2 Variables on the stack were incorrectly allocated overlapping.
7 #pragma disable_warning 85
9 // Based on code by "Under4Mhz" licensed under GPL 2.0 or later
21 void PlayerGridNextGet( maths_point
*next
) {
27 void PlayerGridGet( maths_point
*current
) {
33 int MapGet( int x
, int y
) { return 0; }
35 int StateDoorHiddenOpenSet( int x
, int y
) { ASSERT (x
== 1); ASSERT (y
== 2);} // Bug visible via x == 3 && y == 4 here.
37 bool ObjectIsHiddenDoor( char ch
) { return true; }
39 void SoundDoorOpen() {} // Weirdly, this empty function definition is necesssary to trigger the bug.
44 PlayerGridNextGet( &next
);
45 char ch
= MapGet( next
.x
, next
.y
);
48 PlayerGridGet( ¤t
);
49 char chCurrent
= MapGet( current
.x
, current
.y
);
52 StateDoorHiddenOpenSet( next
.x
, next
.y
);