diff options
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/scriptables/script_ext_array.cpp | 5 | ||||
-rw-r--r-- | engines/wintermute/base/scriptables/script_ext_array.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/wintermute/base/scriptables/script_ext_array.cpp b/engines/wintermute/base/scriptables/script_ext_array.cpp index 79303723e0..a422d6d8a5 100644 --- a/engines/wintermute/base/scriptables/script_ext_array.cpp +++ b/engines/wintermute/base/scriptables/script_ext_array.cpp @@ -75,7 +75,7 @@ SXArray::~SXArray() { //////////////////////////////////////////////////////////////////////////
const char *SXArray::scToString() {
- static char dummy[32768]; // TODO: Get rid of static.
+ char dummy[32768];
strcpy(dummy, "");
char propName[20];
for (int i = 0; i < _length; i++) {
@@ -91,7 +91,8 @@ const char *SXArray::scToString() { strcat(dummy, ",");
}
}
- return dummy;
+ _strRep = dummy;
+ return _strRep.c_str();
}
diff --git a/engines/wintermute/base/scriptables/script_ext_array.h b/engines/wintermute/base/scriptables/script_ext_array.h index 67a1104b46..f2718f4ea2 100644 --- a/engines/wintermute/base/scriptables/script_ext_array.h +++ b/engines/wintermute/base/scriptables/script_ext_array.h @@ -48,6 +48,7 @@ public: private:
int _length;
ScValue *_values;
+ Common::String _strRep;
};
} // end of namespace WinterMute
|