aboutsummaryrefslogtreecommitdiff
path: root/engines/cryomni3d
diff options
context:
space:
mode:
authorLe Philousophe2019-05-05 12:37:47 +0200
committerEugene Sandulenko2019-06-01 22:43:48 +0200
commit5eb8b19a9c8921ddd4d6964bcd5aaa2c38663ae4 (patch)
tree163dda0256bb1a1d93a3577144dfe2104da22a15 /engines/cryomni3d
parentac5d392a76eeb3e1d09bc4c585d6e29f5c9f47d8 (diff)
downloadscummvm-rg350-5eb8b19a9c8921ddd4d6964bcd5aaa2c38663ae4.tar.gz
scummvm-rg350-5eb8b19a9c8921ddd4d6964bcd5aaa2c38663ae4.tar.bz2
scummvm-rg350-5eb8b19a9c8921ddd4d6964bcd5aaa2c38663ae4.zip
CRYOMNI3D: If save name can't be read don't add it
Diffstat (limited to 'engines/cryomni3d')
-rw-r--r--engines/cryomni3d/versailles/saveload.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/cryomni3d/versailles/saveload.cpp b/engines/cryomni3d/versailles/saveload.cpp
index d4985dce39..4ffdaf5d68 100644
--- a/engines/cryomni3d/versailles/saveload.cpp
+++ b/engines/cryomni3d/versailles/saveload.cpp
@@ -100,8 +100,9 @@ void CryOmni3DEngine_Versailles::getSavesList(bool visit, Common::StringArray &s
Common::InSaveFile *in = _saveFileMan->openForLoading(*file);
#endif
if (in) {
- in->read(saveName, SAVE_DESCRIPTION_LEN);
- saveNames.push_back(saveName);
+ if (in->read(saveName, SAVE_DESCRIPTION_LEN) == SAVE_DESCRIPTION_LEN) {
+ saveNames.push_back(saveName);
+ }
delete in;
}
}