aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heider2009-02-25 23:50:16 +0000
committerAndre Heider2009-02-25 23:50:16 +0000
commit522063b28cf3afe2fcdd5539d6769986d0babb00 (patch)
treedcab9f4bf519a3de497ff9a2bca0b9cba17830fb
parent9af7fba681fa1f0b48ec7c8d13305404b5f82efb (diff)
downloadscummvm-rg350-522063b28cf3afe2fcdd5539d6769986d0babb00.tar.gz
scummvm-rg350-522063b28cf3afe2fcdd5539d6769986d0babb00.tar.bz2
scummvm-rg350-522063b28cf3afe2fcdd5539d6769986d0babb00.zip
fix read_SegManagerPtr to not read from an uninitialzed pointer
svn-id: r38889
-rw-r--r--engines/sci/engine/savegame.cfsml2
-rw-r--r--engines/sci/engine/savegame.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index a03643fc8a..b146599e71 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -717,7 +717,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
char *token;
int assignment;
bool sci11;
- %CFSMLREAD bool (&sci11) FROM fh ERRVAR *hiteof FIRSTTOKEN token LINECOUNTER *line;
+ %CFSMLREAD bool (&sci11) FROM fh ERRVAR *hiteof FIRSTTOKEN lastval LINECOUNTER *line;
*foo = new SegManager(sci11);
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
%CFSMLREAD SegManager (*foo) FROM fh ERRVAR *hiteof FIRSTTOKEN token LINECOUNTER *line;
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 66519f15ff..593476fe06 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -4729,7 +4729,7 @@ int read_SegManagerPtr(Common::SeekableReadStream *fh, SegManager **foo, const c
#line 773 "engines/sci/engine/savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
#line 777 "engines/sci/engine/savegame.cfsml"
- const char *_cfsml_inp = token;
+ const char *_cfsml_inp = lastval;
{
#line 788 "engines/sci/engine/savegame.cfsml"
_cfsml_error = _cfsml_read_bool(fh, (&sci11), _cfsml_inp, &(*line), &_cfsml_eof);