Changeset - r16942:11d12798d937
[Not reviewed]
master
0 1 0
smatz - 13 years ago 2011-01-01 17:06:59
smatz@openttd.org
(svn r21688) -Codechange: verify the colour code passed to IConsolePrint()/IConsolePrintF() is valid
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/console.cpp
Show inline comments
 
@@ -86,6 +86,8 @@ void IConsoleFree()
 
 */
 
void IConsolePrint(ConsoleColour colour_code, const char *string)
 
{
 
	assert(IsValidConsoleColour(colour_code));
 

	
 
	char *str;
 
#ifdef ENABLE_NETWORK
 
	if (_redirect_console_to_client != INVALID_CLIENT_ID) {
 
@@ -128,6 +130,8 @@ void IConsolePrint(ConsoleColour colour_
 
 */
 
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *format, ...)
 
{
 
	assert(IsValidConsoleColour(colour_code));
 

	
 
	va_list va;
 
	char buf[ICON_MAX_STREAMSIZE];
 

	
0 comments (0 inline, 0 general)