mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 20:24:12 +01: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:
@@ -150,7 +150,7 @@ void CDECL grfmsg(int severity, const char *str, ...)
|
||||
static inline bool check_length(size_t real, size_t wanted, const char *str)
|
||||
{
|
||||
if (real >= wanted) return true;
|
||||
grfmsg(0, "%s: Invalid pseudo sprite length %d (expected %d)!", str, real, wanted);
|
||||
grfmsg(0, "%s: Invalid pseudo sprite length " PRINTF_SIZE " (expected " PRINTF_SIZE ")!", str, real, wanted);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4226,7 +4226,7 @@ static void GRFInfo(byte *buf, size_t len)
|
||||
_cur_grfconfig->status = _cur_stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED;
|
||||
|
||||
/* Do swap the GRFID for displaying purposes since people expect that */
|
||||
DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08lX - %s (palette: %s)", version, BSWAP32(grfid), name, _cur_grfconfig->windows_paletted ? "Windows" : "DOS");
|
||||
DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08X - %s (palette: %s)", version, BSWAP32(grfid), name, _cur_grfconfig->windows_paletted ? "Windows" : "DOS");
|
||||
}
|
||||
|
||||
/* Action 0x0A */
|
||||
@@ -4403,7 +4403,7 @@ static void GRFComment(byte *buf, size_t len)
|
||||
|
||||
size_t text_len = len - 1;
|
||||
const char *text = (const char*)(buf + 1);
|
||||
grfmsg(2, "GRFComment: %.*s", text_len, text);
|
||||
grfmsg(2, "GRFComment: %.*s", (int)text_len, text);
|
||||
}
|
||||
|
||||
/* Action 0x0D (GLS_SAFETYSCAN) */
|
||||
@@ -4945,7 +4945,7 @@ static void FeatureTownName(byte *buf, size_t len)
|
||||
if (!check_length(len, 1, "FeatureTownName: number of parts")) return;
|
||||
byte nb = grf_load_byte(&buf);
|
||||
len--;
|
||||
grfmsg(6, "FeatureTownName: %d parts", nb, nb);
|
||||
grfmsg(6, "FeatureTownName: %u parts", nb);
|
||||
|
||||
townname->nbparts[id] = nb;
|
||||
townname->partlist[id] = CallocT<NamePartList>(nb);
|
||||
|
||||
Reference in New Issue
Block a user