diff options
author | Colin Snover | 2017-12-06 16:31:02 -0600 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-18 16:30:05 +0200 |
commit | bc3c8bd8d251b7a0631e1993e6365719382eacf6 (patch) | |
tree | 341d12376f13e65eb06f088e1fb09a8c67ec813c /engines/lure/room.cpp | |
parent | 0851a30769c6307796d6866da073632c83d61185 (diff) | |
download | scummvm-rg350-bc3c8bd8d251b7a0631e1993e6365719382eacf6.tar.gz scummvm-rg350-bc3c8bd8d251b7a0631e1993e6365719382eacf6.tar.bz2 scummvm-rg350-bc3c8bd8d251b7a0631e1993e6365719382eacf6.zip |
LURE: Replace use of strdup with Common::String
Diffstat (limited to 'engines/lure/room.cpp')
-rw-r--r-- | engines/lure/room.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp index 1be95ba3d4..cb817abbca 100644 --- a/engines/lure/room.cpp +++ b/engines/lure/room.cpp @@ -491,18 +491,17 @@ void Room::update() { if (_hotspotId != 0) s.writeString(0, 0, _hotspotName, false); } else { - // Word wrap (if necessary) the status line and dispaly it - char *statusLineCopy = strdup(_statusLine); + // Word wrap (if necessary) the status line and display it + Common::String statusLineCopy(_statusLine); char **lines; uint8 numLines; int16 yPos = 0; - s.wordWrap(statusLineCopy, s.width(), lines, numLines); + s.wordWrap(statusLineCopy.begin(), s.width(), lines, numLines); for (int lineNum = 0; lineNum < numLines; ++lineNum) { s.writeString(0, yPos, lines[lineNum], false, white); yPos += FONT_HEIGHT; } Memory::dealloc(lines); - Memory::dealloc(statusLineCopy); } // Debug - if the bottle object is on layer 0FEh, then display it's surface |