(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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user