From a329be773e976a70a4b092542dcde024d40d0106 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 20 Apr 2008 10:39:39 +0000 Subject: - Fixed some valgrind warnings. - Little bugfix for scene shape loading. svn-id: r31591 --- engines/kyra/kyra_v3.cpp | 2 +- engines/kyra/scene_v3.cpp | 1 + engines/kyra/text_v3.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/kyra') diff --git a/engines/kyra/kyra_v3.cpp b/engines/kyra/kyra_v3.cpp index b87cd8b9a2..9bca12cdb9 100644 --- a/engines/kyra/kyra_v3.cpp +++ b/engines/kyra/kyra_v3.cpp @@ -131,7 +131,7 @@ KyraEngine_v3::~KyraEngine_v3() { delete [] _sceneAnims; for (uint i = 0; i < ARRAYSIZE(_sceneShapes); ++i) - delete _sceneShapes[i]; + delete [] _sceneShapes[i]; for (uint i = 0; i < ARRAYSIZE(_sceneAnimMovie); ++i) delete _sceneAnimMovie[i]; diff --git a/engines/kyra/scene_v3.cpp b/engines/kyra/scene_v3.cpp index e08b3e2bf6..e849493307 100644 --- a/engines/kyra/scene_v3.cpp +++ b/engines/kyra/scene_v3.cpp @@ -410,6 +410,7 @@ void KyraEngine_v3::initSceneScript(int unk1) { int16 y = stream->readSint16LE(); int16 w = stream->readSint16LE(); int16 h = stream->readSint16LE(); + stream->seek(4, SEEK_CUR); _sceneShapes[i] = _screen->encodeShape(x, y, w, h, 0); assert(_sceneShapes[i]); musicUpdate(0); diff --git a/engines/kyra/text_v3.cpp b/engines/kyra/text_v3.cpp index 980d6a9ee1..0c252397d2 100644 --- a/engines/kyra/text_v3.cpp +++ b/engines/kyra/text_v3.cpp @@ -35,7 +35,8 @@ TextDisplayer_v3::TextDisplayer_v3(KyraEngine_v3 *vm, Screen_v3 *screen) char *TextDisplayer_v3::preprocessString(const char *str) { debugC(9, kDebugLevelMain, "TextDisplayer_v3::preprocessString('%s')", str); - strcpy(_talkBuffer, str); + if (_talkBuffer != str) + strcpy(_talkBuffer, str); char *p = _talkBuffer; while (*p) { -- cgit v1.2.3