stupid assert needs a fix

This commit is contained in:
Enno Rehling 2008-05-24 18:29:27 +00:00
parent fe841cd3c0
commit 3a476bb279

View file

@ -1050,14 +1050,16 @@ set_number(unit * u, int count)
assert (count <= UNIT_MAXSIZE);
#ifndef NDEBUG
assert (u->faction != NULL || u->number > 0);
assert(u->faction || count==0);
#endif
if (u->faction) {
if (playerrace(u->race)) {
u->faction->num_people += count - u->number;
}
u->number = (unsigned short)count;
}
}
boolean
learn_skill(unit * u, skill_t sk, double chance)