From 5eb8b19a9c8921ddd4d6964bcd5aaa2c38663ae4 Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Sun, 5 May 2019 12:37:47 +0200 Subject: CRYOMNI3D: If save name can't be read don't add it --- engines/cryomni3d/versailles/saveload.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/cryomni3d') 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; } } -- cgit v1.2.3