From fe6b21129de006d49ba1ad7f0470b3463fcfff28 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 14 Oct 2005 19:32:58 +0000 Subject: [PATCH] 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 --- scumm/saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 409b713a3f5..f53eeef1dcd 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; }