diff options
author | Max Horn | 2003-07-28 02:39:40 +0000 |
---|---|---|
committer | Max Horn | 2003-07-28 02:39:40 +0000 |
commit | d4933386a973b30be629650fe629cceb3f6450cf (patch) | |
tree | 0675a3477ad3d0d235b34a20080ca698d9a2bbf8 | |
parent | 544168e96b04bbcf0015e9a853702f89fa31a40f (diff) | |
download | scummvm-rg350-d4933386a973b30be629650fe629cceb3f6450cf.tar.gz scummvm-rg350-d4933386a973b30be629650fe629cceb3f6450cf.tar.bz2 scummvm-rg350-d4933386a973b30be629650fe629cceb3f6450cf.zip |
big FIXME
svn-id: r9221
-rw-r--r-- | sword2/interpreter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sword2/interpreter.cpp b/sword2/interpreter.cpp index 91bf84f3ad..677666610f 100644 --- a/sword2/interpreter.cpp +++ b/sword2/interpreter.cpp @@ -325,6 +325,12 @@ int RunScript ( const char * scriptData , char * objectData , uint32 *offset ) // Get the start of variables and start of code DEBUG3("Enter interpreter data %x, object %x, offset %d",scriptData,objectData,*offset); + + // FIXME: The following is a fundamental (?) flaw in the code. + // Both "variables" and "scriptData" are const pointers. However, + // later the code actually writes code into "variables". Both can't + // be the case at the same time. Either the const qualifiers have + // to be removed, or the writes to *variables are bogus. const char *variables = scriptData + sizeof(int); const char *code = scriptData + *((int *)scriptData) + sizeof(int); uint32 noScripts = *((int32 *)code); |