Skip to content

Commit

Permalink
Additional fix to DrawMoveBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatRambler committed Jul 2, 2022
1 parent 0512f91 commit 9ec3865
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LevelDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@ void LevelDrawer::DrawMoveBlock(unsigned char ID, unsigned char EX, int X, int Y
YY = std::round((Y + 80) / 160.0 + 1);
int i = 0;

if(EX > level.MapMoveBlk.size()) {
return;
}

switch(ID) {
case 85: {
switch(level.MapTrackBlk[EX - 1].Node[0].p1) {
Expand Down Expand Up @@ -828,10 +832,6 @@ void LevelDrawer::DrawMoveBlock(unsigned char ID, unsigned char EX, int X, int Y
}
} break;
case 119: {
if(EX > level.MapMoveBlk.size()) {
return;
}

switch(level.MapMoveBlk[EX - 1].Node[0].p1) {
case 1:
case 5:
Expand Down

0 comments on commit 9ec3865

Please sign in to comment.