mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-23 19:46:34 +00:00
(svn r16273) [0.7] -Backport from trunk:
- Fix: Wrong number of parameters or wrong parameter types sent to printf-like functions at several places (r16269) - Fix: [NewGRF] When callback 2E returns an amount of 0, do not transport 1 unit to the station (r16268) - Fix: [NoAI] Various documentation omissions with respect to IDs of various objects and corners for AITile::(Raise|Lower)Tile (r16267,r16266)
This commit is contained in:
+3
-3
@@ -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