From bb02505fb3a4ddf403871cd2010c4517dc32c516 Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 22 Jun 2017 16:31:04 +0000 Subject: (svn r27883) -Fix [FS#6576]: Console command parser passed invalid strings to the debug output, if command lines had many parameters. --- src/console.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); } -- cgit v1.2.3-54-g00ecf