check to make sure flood fill doesn't crash when pmap is errored (?)

This commit is contained in:
jacob1
2013-12-29 11:03:55 -05:00
parent 3e3fe1af73
commit c4562ec73e
2 changed files with 8 additions and 5 deletions

View File

@@ -535,7 +535,7 @@ sources+=Glob("generated/ToolClasses.cpp")
env.Decider('MD5') env.Decider('MD5')
# set a defaukt target # set a default target
t=env.Program(target=programName, source=sources) t=env.Program(target=programName, source=sources)
Default(t) Default(t)

View File

@@ -1479,12 +1479,15 @@ int Simulation::FloodParts(int x, int y, int fullc, int cm, int flags)
} }
x2++; x2++;
} }
if (FloodFillPmapCheck(x2+1, y, cm))
{
// fill span // fill span
for (x=x1; x<=x2; x++) for (x=x1; x<=x2; x++)
{ {
if (CreateParts(x, y, 0, 0, fullc, flags)) if (CreateParts(x, y, 0, 0, fullc, flags))
created_something = 1; created_something = 1;
} }
}
if (c?y>=CELL+dy:y>=dy) if (c?y>=CELL+dy:y>=dy)
for (x=x1; x<=x2; x++) for (x=x1; x<=x2; x++)