(svn r13650) [NoAI] -Fix: don't segfault if you type just 'stop_ai' noai
authortruebrain
Mon, 30 Jun 2008 09:57:17 +0000
branchnoai
changeset 11093 c69806443a1c
parent 11079 925e3823a101
child 11094 72be0534cd0f
(svn r13650) [NoAI] -Fix: don't segfault if you type just 'stop_ai'
src/console_cmds.cpp
--- a/src/console_cmds.cpp	Wed Jun 25 20:09:47 2008 +0000
+++ b/src/console_cmds.cpp	Mon Jun 30 09:57:17 2008 +0000
@@ -905,7 +905,7 @@
 
 DEF_CONSOLE_CMD(ConStopAI)
 {
-	if (argc == 0) {
+	if (argc != 2) {
 		IConsoleHelp("Stop an AI. Usage: 'stop_ai <company-id>'");
 		IConsoleHelp("Stop the AI with the given company id. For company-id's, see the list of companies from the dropdown menu. Player 1 is 1, etc.");
 		return true;