From d4933386a973b30be629650fe629cceb3f6450cf Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 28 Jul 2003 02:39:40 +0000 Subject: big FIXME svn-id: r9221 --- sword2/interpreter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3