SCUMM: Only try to load savefile metadata from slots >= 0

svn-id: r33607
This commit is contained in:
Max Horn 2008-08-04 11:46:52 +00:00
parent 5f4c9f913f
commit 73cbcd33e0

View File

@ -479,6 +479,9 @@ Graphics::Surface *ScummEngine::loadThumbnailFromSlot(int slot) {
Common::SeekableReadStream *in; Common::SeekableReadStream *in;
SaveGameHeader hdr; SaveGameHeader hdr;
if (slot < 0)
return 0;
makeSavegameName(filename, slot, false); makeSavegameName(filename, slot, false);
if (!(in = _saveFileMan->openForLoading(filename))) { if (!(in = _saveFileMan->openForLoading(filename))) {
return 0; return 0;
@ -507,6 +510,9 @@ bool ScummEngine::loadInfosFromSlot(int slot, InfoStuff *stuff) {
Common::SeekableReadStream *in; Common::SeekableReadStream *in;
SaveGameHeader hdr; SaveGameHeader hdr;
if (slot < 0)
return 0;
makeSavegameName(filename, slot, false); makeSavegameName(filename, slot, false);
if (!(in = _saveFileMan->openForLoading(filename))) { if (!(in = _saveFileMan->openForLoading(filename))) {
return false; return false;