aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_vars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk/riven_vars.cpp')
-rw-r--r--engines/mohawk/riven_vars.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/mohawk/riven_vars.cpp b/engines/mohawk/riven_vars.cpp
index c45b464b4d..2a19282c2b 100644
--- a/engines/mohawk/riven_vars.cpp
+++ b/engines/mohawk/riven_vars.cpp
@@ -23,6 +23,7 @@
#include "common/str.h"
#include "mohawk/riven.h"
+#include "mohawk/riven_stack.h"
namespace Mohawk {
@@ -268,7 +269,7 @@ static const char *variableNames[] = {
};
uint32 &MohawkEngine_Riven::getStackVar(uint32 index) {
- Common::String name = getName(kVariableNames, index);
+ Common::String name = getCurStack()->getName(kVariableNames, index);
if (!_vars.contains(name))
error("Could not find variable '%s' (stack variable %d)", name.c_str(), index);