Fix off-by-one mistake in C4Landscape assertion

qteditor
Kanibal 2016-07-24 02:32:49 +02:00 committed by Sven Eberhardt
parent fa8b56b40a
commit 1c63c8cbe0
1 changed files with 2 additions and 2 deletions

View File

@ -4177,13 +4177,13 @@ C4FoW * C4Landscape::GetFoW()
int32_t C4Landscape::GetMatCount(int material) const
{
assert(material > 0 && material < p->MatCount.size());
assert(material >= 0 && material < p->MatCount.size());
return p->MatCount[material];
}
int32_t C4Landscape::GetEffectiveMatCount(int material) const
{
assert(material > 0 && material < p->EffectiveMatCount.size());
assert(material >= 0 && material < p->EffectiveMatCount.size());
return p->EffectiveMatCount[material];
}