aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorDenis Kasak2009-07-12 18:55:44 +0000
committerDenis Kasak2009-07-12 18:55:44 +0000
commita41d36de0f2db1ef6572d0a19a1015dd9500e129 (patch)
treece96ce94f5172543b1e361bf36485acf2a99993e /engines/draci
parent6b2991f488c4634f5663eb0734e543d311b82f84 (diff)
downloadscummvm-rg350-a41d36de0f2db1ef6572d0a19a1015dd9500e129.tar.gz
scummvm-rg350-a41d36de0f2db1ef6572d0a19a1015dd9500e129.tar.bz2
scummvm-rg350-a41d36de0f2db1ef6572d0a19a1015dd9500e129.zip
Fixed bug in the GPL math evaluator (GPL function results were not pushed onto the evaluation stack).
svn-id: r42424
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/script.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index c63c9faea6..e9d35226ba 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -350,6 +350,9 @@ int Script::handleMathExpression(Common::MemoryReadStream &reader) {
// Calculate result
res = (this->*(func._handler))(arg1);
+
+ // Push the result on the evaluation stack
+ stk.push(res);
debugC(3, kDraciBytecodeDebugLevel, "\t\tcall: %s(%d) (res: %d)",
func._name.c_str(), arg1, res);