diff options
author | Max Horn | 2002-12-10 11:14:40 +0000 |
---|---|---|
committer | Max Horn | 2002-12-10 11:14:40 +0000 |
commit | 58ea0648e52eb09b6d66f409664d0e7e647374e5 (patch) | |
tree | c31f98521eb9f8ebc9e535c018ce8ba3cc42b419 /scumm | |
parent | 6582e62e14877967e2fb6d16d70606f7e1805f96 (diff) | |
download | scummvm-rg350-58ea0648e52eb09b6d66f409664d0e7e647374e5.tar.gz scummvm-rg350-58ea0648e52eb09b6d66f409664d0e7e647374e5.tar.bz2 scummvm-rg350-58ea0648e52eb09b6d66f409664d0e7e647374e5.zip |
Fix for bug #651310: Crash when saving
svn-id: r5898
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/saveload.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index c8648b8de8..6cc2746ed8 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -733,7 +733,10 @@ void Serializer::saveArrayOf(void *b, int len, int datasize, byte filetype) } while (--len >= 0) { - if (datasize == 1) { + if (datasize == 0) { + // Do nothing for obsolete data + data = 0; + } else if (datasize == 1) { data = *(byte *)at; at += 1; } else if (datasize == 2) { |