summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-03 12:04:53 +0000
committerrubidium <rubidium@openttd.org>2011-01-03 12:04:53 +0000
commit37b9c311184c21dda3da165c18933b707d2a227b (patch)
treea484321be95407af5b029484a757eea8bb191f5a /src/console_cmds.cpp
parentb25cf57542dbf294a9de3f7a9910e1e08e6ed7a4 (diff)
downloadopenttd-37b9c311184c21dda3da165c18933b707d2a227b.tar.xz
(svn r21702) -Fix: make sure the colour argument of echoc is properly validated to be a text colour
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r--src/console_cmds.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 85c3a6d98..4012c1c8a 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -958,7 +958,7 @@ DEF_CONSOLE_CMD(ConEchoC)
}
if (argc < 3) return false;
- IConsolePrint((TextColour)atoi(argv[1]), argv[2]);
+ IConsolePrint((TextColour)Clamp(atoi(argv[1]), TC_BEGIN, TC_END - 1), argv[2]);
return true;
}