Fix MapCache crash when in Arena mode

develop
Quietust 2012-02-13 09:56:35 -06:00
parent e39852ff2e
commit 9f43d61c2c
1 changed files with 5 additions and 0 deletions

@ -76,6 +76,11 @@ void SquashRocks ( std::vector< std::vector <uint16_t> > * layerassign, DFHack::
materials[xx][yy] = -1; materials[xx][yy] = -1;
continue; continue;
} }
if (mb.biome_indices[test] >= layerassign->size())
{
materials[xx][yy] = -1;
continue;
}
materials[xx][yy] = materials[xx][yy] =
layerassign->at(mb.biome_indices[test])[mb.designation[xx][yy].bits.geolayer_index]; layerassign->at(mb.biome_indices[test])[mb.designation[xx][yy].bits.geolayer_index];
} }