aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/hero.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp
index dfc0e4b351..7e6c384a46 100644
--- a/engines/cge2/hero.cpp
+++ b/engines/cge2/hero.cpp
@@ -40,7 +40,10 @@ Sprite *Hero::expand() { // It's very similar to Sprite's expand, but doesn't bo
if (_ext)
return this;
- char *text = _vm->_text->getText(_ref + 100);
+ Common::String str(_vm->_text->getText(_ref + 100));
+ char text[kLineMax + 1];
+ strcpy(text, str.c_str());
+
char fname[kMaxPath];
_vm->mergeExt(fname, _file, kSprExt);
_ext = new SprExt(_vm);