aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-05 14:45:05 -0500
committermegamage <none@none>2009-06-05 14:45:05 -0500
commit8d66848af87d8c6fe88e4cca465bf774bf954f74 (patch)
treea9706d9e7d714c6c771c1628bc64754fdbab1c11
parent5aa9fdb556a6d78520ee98d0f88f28c884c7e3df (diff)
*Fix a crash when aubot command is not correctly used.
--HG-- branch : trunk
-rw-r--r--src/game/Level3.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index d14705ae8be..2082c7e5339 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -63,6 +63,16 @@ bool ChatHandler::HandleAHBotOptionsCommand(const char* args)
if (ahMapIdStr)
{
ahMapID = (uint32) strtoul(ahMapIdStr, NULL, 0);
+ switch (ahMapID)
+ {
+ case 2:
+ case 6:
+ case 7:
+ break;
+ default:
+ opt = NULL;
+ break;
+ }
}
if (!opt)
{