From 8d66848af87d8c6fe88e4cca465bf774bf954f74 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 5 Jun 2009 14:45:05 -0500 Subject: *Fix a crash when aubot command is not correctly used. --HG-- branch : trunk --- src/game/Level3.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/game/Level3.cpp') 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) { -- cgit v1.2.3