aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-05 05:23:46 +0000
committerJohannes Schickel2008-04-05 05:23:46 +0000
commitc676cf560f664d68adc337da579d788cea2606b1 (patch)
tree36e93b3b58445c360728a24c882ab687bf98ec1d /engines
parentc826716a9134d1dff9a1ed4deefb4957b3530fc5 (diff)
downloadscummvm-rg350-c676cf560f664d68adc337da579d788cea2606b1.tar.gz
scummvm-rg350-c676cf560f664d68adc337da579d788cea2606b1.tar.bz2
scummvm-rg350-c676cf560f664d68adc337da579d788cea2606b1.zip
Fixed crash when supplying illegal savefile names.
svn-id: r31402
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index 056f75a570..09ce9e9302 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -308,6 +308,8 @@ void GUI::updateSaveList() {
s1 = (*i)[i->size()-3] - '0';
s2 = (*i)[i->size()-2] - '0';
s3 = (*i)[i->size()-1] - '0';
+ if (s1 < 0 || s2 < 0 || s3 < 0 || s1 > 9 || s2 > 9 || s3 > 9)
+ continue;
_saveSlots.push_back(s1*100+s2*10+s3);
}