mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 19:29:52 +02:00
fix occasional crash when flood fill deleting
This commit is contained in:
@@ -1432,8 +1432,13 @@ int Simulation::FloodParts(int x, int y, int fullc, int cm, int flags)
|
|||||||
cm = pmap[y][x]&0xFF;
|
cm = pmap[y][x]&0xFF;
|
||||||
if (!cm)
|
if (!cm)
|
||||||
cm = photons[y][x]&0xFF;
|
cm = photons[y][x]&0xFF;
|
||||||
if (!cm && bmap[y/CELL][x/CELL])
|
if (!cm)
|
||||||
FloodWalls(x, y, WL_ERASE, -1);
|
{
|
||||||
|
if (bmap[y/CELL][x/CELL])
|
||||||
|
return FloodWalls(x, y, WL_ERASE, -1);
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cm = 0;
|
cm = 0;
|
||||||
|
Reference in New Issue
Block a user