summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/console.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/console.cpp b/src/console.cpp
index 511019281..ef62a8f28 100644
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -473,7 +473,7 @@ void IConsoleCmdExec(const char *cmdstr)
}
}
- for (uint i = 0; tokens[i] != NULL; i++) {
+ for (uint i = 0; i < lengthof(tokens) && tokens[i] != NULL; i++) {
DEBUG(console, 8, "Token %d is: '%s'", i, tokens[i]);
}