- Fixed some valgrind warnings.

- Little bugfix for scene shape loading.

svn-id: r31591
This commit is contained in:
Johannes Schickel 2008-04-20 10:39:39 +00:00
parent 8cbd185731
commit a329be773e
3 changed files with 4 additions and 2 deletions

View File

@ -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];

View File

@ -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);

View File

@ -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) {