diff options
author | uruk | 2014-06-30 01:10:17 +0200 |
---|---|---|
committer | uruk | 2014-06-30 01:10:17 +0200 |
commit | 7810df976b2c2df324092add3f06b0841e1b0dca (patch) | |
tree | feae5e47fe5895e325bc812405de01f15630f56e /engines/cge2 | |
parent | ade740de1098930d5b9827b98c844d300ded04b8 (diff) | |
download | scummvm-rg350-7810df976b2c2df324092add3f06b0841e1b0dca.tar.gz scummvm-rg350-7810df976b2c2df324092add3f06b0841e1b0dca.tar.bz2 scummvm-rg350-7810df976b2c2df324092add3f06b0841e1b0dca.zip |
CGE2: Rework Hero::expand() so it won't modify Text's content.
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/hero.cpp | 5 |
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); |