Do a bounds check not to exceed NUM_FACTORY_TYPES.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11684 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 4b45c471c60d2ae1d9c25e4f96f2c7574f73e1f1)
master
Buginator 2010-09-19 01:53:23 +00:00 committed by buginator
parent d6b47d1122
commit f5b845a611
1 changed files with 4 additions and 0 deletions

View File

@ -3531,6 +3531,10 @@ static void orderFactories(void)
{
inc = 0;
type++;
if (type > NUM_FACTORY_TYPES)
{
type = 0;
}
}
objectInc = 0;
}