summaryrefslogtreecommitdiff
path: root/src/console.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-10 17:27:25 +0000
committersmatz <smatz@openttd.org>2009-05-10 17:27:25 +0000
commitf5316c5cbd13c3ce8c0a7d8b652ce7d975c17438 (patch)
treee9c57e3fa45a652740e681f7d25b731d7b2f9cfb /src/console.cpp
parent552f10bb09667a7c36724092d290808c2c9e51b4 (diff)
downloadopenttd-f5316c5cbd13c3ce8c0a7d8b652ce7d975c17438.tar.xz
(svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
Diffstat (limited to 'src/console.cpp')
-rw-r--r--src/console.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/console.cpp b/src/console.cpp
index 161a7b179..2f9553aa0 100644
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -116,13 +116,13 @@ void IConsolePrint(ConsoleColour colour_code, const char *string)
* by any other means. Uses printf() style format, for more information look
* at IConsolePrint()
*/
-void CDECL IConsolePrintF(ConsoleColour colour_code, const char *s, ...)
+void CDECL IConsolePrintF(ConsoleColour colour_code, const char *format, ...)
{
va_list va;
char buf[ICON_MAX_STREAMSIZE];
- va_start(va, s);
- vsnprintf(buf, sizeof(buf), s, va);
+ va_start(va, format);
+ vsnprintf(buf, sizeof(buf), format, va);
va_end(va);
IConsolePrint(colour_code, buf);