Skip to content

Commit

Permalink
Fix for memory corruption bug when calculating power grid connectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
jhhoward committed Dec 5, 2020
1 parent db9530d commit ae265f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/MicroCity/Connectivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void PowerFloodFill(uint8_t x, uint8_t y)
void PowerFloodFill(uint8_t x, uint8_t y)
{
uint8_t* grid = (uint8_t*)GetPowerGrid();
uint8_t* stackPtr = grid;
uint8_t* stackPtr = grid + (MAP_WIDTH * MAP_HEIGHT / 8);
uint8_t stackSize = 0;

STACK_PUSH(x, y);
Expand Down

0 comments on commit ae265f1

Please sign in to comment.