summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-06-06 12:58:10 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2020-06-06 12:58:10 +0300
commit408f47fc9d85e930f2dc1a4cc9f50b3c0d4c60b8 (patch)
tree72832cf089e0b26dc6e0585d7c999604421878e2
parent2016cd54b0038cf3a56fb4aa6b36ce98e12cbe7f (diff)
fixed linux saving
-rw-r--r--src/core/common.h2
-rw-r--r--src/vehicles/CarGen.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 7d339660..ff1feb5c 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -404,7 +404,7 @@ inline T *WriteSaveBuf(uint8 *&buf, const T &value)
WriteSaveBuf(buf, b);\
WriteSaveBuf(buf, c);\
WriteSaveBuf(buf, d);\
- WriteSaveBuf(buf, size);
+ WriteSaveBuf<uint32>(buf, size);
#define CheckSaveHeader(buf,a,b,c,d,size)\
assert(ReadSaveBuf<char>(buf) == a);\
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index 72b6c30c..cb21b918 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -226,7 +226,7 @@ INITSAVEBUF
WriteSaveBuf(buffer, ProcessCounter);
WriteSaveBuf(buffer, GenerateEvenIfPlayerIsCloseCounter);
WriteSaveBuf(buffer, (int16)0); // alignment
- WriteSaveBuf(buffer, sizeof(CarGeneratorArray));
+ WriteSaveBuf(buffer, (uint32)sizeof(CarGeneratorArray));
for (int i = 0; i < NUM_CARGENS; i++)
WriteSaveBuf(buffer, CarGeneratorArray[i]);
VALIDATESAVEBUF(*size)