Change: prefix SL_ARR with the length of the array
This means that during loading we can validate that what is saved is also that what is expected. Additionally, this makes all list types similar to how they are stored on disk: First a gamma to indicate length, followed by the data. The size still depends on the type.
This commit is contained in:

committed by
Patric Stout

parent
f67af5cbe5
commit
97b94bdc9a
@@ -1008,7 +1008,7 @@ byte SlReadByte();
|
||||
void SlWriteByte(byte b);
|
||||
|
||||
void SlGlobList(const SaveLoadTable &slt);
|
||||
void SlArray(void *array, size_t length, VarType conv);
|
||||
void SlCopy(void *object, size_t length, VarType conv);
|
||||
void SlObject(void *object, const SaveLoadTable &slt);
|
||||
void NORETURN SlError(StringID string, const char *extra_msg = nullptr);
|
||||
void NORETURN SlErrorCorrupt(const char *msg);
|
||||
|
Reference in New Issue
Block a user