Tested areCellsFree function

This commit is contained in:
mathusummut
2019-02-06 01:10:59 +01:00
parent b69dafdd78
commit 497e58a5ce
8 changed files with 59 additions and 9 deletions

View File

@@ -645,9 +645,9 @@ namespace Shared {
}
void MapPreview::resetFactions(int maxPlayers) {
if (maxPlayers < MIN_MAP_FACTIONCOUNT || maxPlayers > MAX_MAP_FACTIONCOUNT) {
if (maxPlayers < 0 || maxPlayers > MAX_MAP_FACTIONCOUNT) {
char szBuf[8096] = "";
snprintf(szBuf, 8096, "Max Players must be in the range %d-%d", MIN_MAP_FACTIONCOUNT, MAX_MAP_FACTIONCOUNT);
snprintf(szBuf, 8096, "Max Players must be in the range %d-%d", 0, MAX_MAP_FACTIONCOUNT);
throw game_runtime_error(szBuf);
}