about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-24 15:22:40 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-24 15:22:40 +0000
commit01d74a6d4d23454e50dedad4572fbf8dad80f34d (patch)
treed57b9d572e4a5f6a488f66fcd2fd736330c9e7b3 /src/game/client
parent9d3fd4a28218ad49c10ab768ffda38faf31a9531 (diff)
downloadzcatch-01d74a6d4d23454e50dedad4572fbf8dad80f34d.tar.gz
zcatch-01d74a6d4d23454e50dedad4572fbf8dad80f34d.zip
fixed div by zero bug
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/components/console.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp
index fd5fe8bf..c1493fb8 100644
--- a/src/game/client/components/console.cpp
+++ b/src/game/client/components/console.cpp
@@ -136,7 +136,7 @@ void CONSOLE::INSTANCE::on_input(INPUT_EVENT e)
 			console_possible_commands(completion_buffer, completion_flagmask, possible_commands_complete_callback, this);
 
 			// handle wrapping
-			if(completion_chosen >= completion_enumeration_count)
+			if(completion_enumeration_count && completion_chosen >= completion_enumeration_count)
 			{
 				completion_chosen %= completion_enumeration_count;
 				completion_enumeration_count = 0;