summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-18 22:26:38 +0000
committerrubidium <rubidium@openttd.org>2009-08-18 22:26:38 +0000
commitd4adee0b1d8b064309c9444488a093749006a7eb (patch)
tree8d42f581a60d79e918f2edaf7f6f8a58618b95ac /src/saveload
parenta8773bba2dda31eb31fb2f37e6fa7d5c79e89a5c (diff)
downloadopenttd-d4adee0b1d8b064309c9444488a093749006a7eb.tar.xz
(svn r17216) -Update: MiniLZO from 1.08 to 2.03.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 435e937dd..374c75b5e 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1185,7 +1185,7 @@ static size_t ReadLZO()
byte out[LZO_SIZE + LZO_SIZE / 64 + 16 + 3 + 8];
uint32 tmp[2];
uint32 size;
- uint len;
+ lzo_uint len;
/* Read header*/
if (fread(tmp, sizeof(tmp), 1, _sl.fh) != 1) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_READABLE, "File read failed");
@@ -1217,10 +1217,10 @@ static void WriteLZO(size_t size)
{
byte out[LZO_SIZE + LZO_SIZE / 64 + 16 + 3 + 8];
byte wrkmem[sizeof(byte*) * 4096];
- uint outlen;
+ lzo_uint outlen;
lzo1x_1_compress(_sl.buf, (lzo_uint)size, out + sizeof(uint32) * 2, &outlen, wrkmem);
- ((uint32*)out)[1] = TO_BE32(outlen);
+ ((uint32*)out)[1] = TO_BE32((uint32)outlen);
((uint32*)out)[0] = TO_BE32(lzo_adler32(0, out + sizeof(uint32), outlen + sizeof(uint32)));
if (fwrite(out, outlen + sizeof(uint32) * 2, 1, _sl.fh) != 1) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE);
}