diff options
Diffstat (limited to 'engines/m4/script.h')
-rw-r--r-- | engines/m4/script.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/m4/script.h b/engines/m4/script.h index a59bf46e86..2a937040e9 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -300,7 +300,8 @@ public: const T& toData(const ScriptValue &value) { printf("ScriptInterpreter::toData() index = %d; type = %d; max = %d\n", value.value, _data[value.value]->type, _data.size()); assert((uint32)value.value < _data.size()); - return *(_dataCache->load<T>(_scriptFile, _data[value.value]->offset)); + T *result = _dataCache->load<T>(_scriptFile, _data[value.value]->offset); + return *result; } const char *getGlobalString(int index) const { |