(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:
rubidium
2009-05-10 21:33:55 +00:00
parent 9676072298
commit 8446d6b8c2
25 changed files with 155 additions and 64 deletions
+3 -3
View File
@@ -595,7 +595,7 @@ bool TarListAddFile(const char *filename)
/* Calculate the size of the file.. for some strange reason this is stored as a string */
memcpy(buf, th.size, sizeof(th.size));
buf[sizeof(th.size)] = '\0';
int skip = strtol(buf, &end, 8);
size_t skip = strtoul(buf, &end, 8);
switch (th.typeflag) {
case '\0':
@@ -614,7 +614,7 @@ bool TarListAddFile(const char *filename)
/* Convert to lowercase and our PATHSEPCHAR */
SimplifyFileName(name);
DEBUG(misc, 6, "Found file in tar: %s (%d bytes, %d offset)", name, skip, pos);
DEBUG(misc, 6, "Found file in tar: %s (" PRINTF_SIZE " bytes, " PRINTF_SIZE " offset)", name, skip, pos);
if (_tar_filelist.insert(TarFileList::value_type(name, entry)).second) num++;
break;
@@ -702,7 +702,7 @@ bool TarListAddFile(const char *filename)
pos += skip;
}
DEBUG(misc, 1, "Found tar '%s' with %d new files", filename, num);
DEBUG(misc, 1, "Found tar '%s' with " PRINTF_SIZE " new files", filename, num);
fclose(f);
/* Resolve file links and store directory links.