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
This commit is contained in:
Gregory Montoir 2005-10-14 19:32:58 +00:00
parent 80fd4fe088
commit fe6b21129d

View file

@ -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;
}