aboutsummaryrefslogtreecommitdiff
path: root/scumm/saveload.cpp
diff options
context:
space:
mode:
authorGregory Montoir2005-10-14 19:32:58 +0000
committerGregory Montoir2005-10-14 19:32:58 +0000
commitfe6b21129de006d49ba1ad7f0470b3463fcfff28 (patch)
tree7911807983b8c228e213712201b9eee3a450bbcf /scumm/saveload.cpp
parent80fd4fe088ce9f4945008840be77a2b1ddb92ce5 (diff)
downloadscummvm-rg350-fe6b21129de006d49ba1ad7f0470b3463fcfff28.tar.gz
scummvm-rg350-fe6b21129de006d49ba1ad7f0470b3463fcfff28.tar.bz2
scummvm-rg350-fe6b21129de006d49ba1ad7f0470b3463fcfff28.zip
Fixed the 'Failed to save game state' warning in HE90. _numBitVariables is equal to 0 there, so Serializer::saveLoadArrayOf() is called with len=0 which calls GzipSaveFile::write() with dataSize=0, which leads to GzipSaveFile::_ioError being set.
svn-id: r19084
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r--scumm/saveload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 409b713a3f..f53eeef1dc 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -1415,7 +1415,7 @@ void Serializer::saveArrayOf(void *b, int len, int datasize, byte filetype) {
uint32 data;
// speed up byte arrays
- if (datasize == 1 && filetype == sleByte) {
+ if (len > 0 && datasize == 1 && filetype == sleByte) {
saveBytes(b, len);
return;
}