From 296bad07b8dcd8de3fd5316d70cf66ed646fcb42 Mon Sep 17 00:00:00 2001 From: Matthew Stewart Date: Fri, 29 Jun 2018 15:37:16 -0400 Subject: STARTREK: Missing null-terminator with animations --- engines/startrek/startrek.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/startrek') diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp index 48f8879c99..d829dd98c9 100644 --- a/engines/startrek/startrek.cpp +++ b/engines/startrek/startrek.cpp @@ -607,9 +607,10 @@ void StarTrekEngine::drawActorToScreen(Actor *actor, const Common::String &_anim actor->animFile->seek(16, SEEK_SET); actor->frameToStartNextAnim = actor->animFile->readUint16() + _frameIndex; - char firstFrameFilename[10]; + char firstFrameFilename[11]; actor->animFile->seek(0, SEEK_SET); actor->animFile->read(firstFrameFilename, 10); + firstFrameFilename[10] = '\0'; Sprite *sprite = &actor->sprite; if (addSprite) -- cgit v1.2.3