aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek
diff options
context:
space:
mode:
authorMatthew Stewart2018-06-29 15:37:16 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit296bad07b8dcd8de3fd5316d70cf66ed646fcb42 (patch)
treee9b80abacb9acffd7dba10da90ade3e49d24bb9a /engines/startrek
parenta636aacf5161161180bd948c7f72bc8acd0113db (diff)
downloadscummvm-rg350-296bad07b8dcd8de3fd5316d70cf66ed646fcb42.tar.gz
scummvm-rg350-296bad07b8dcd8de3fd5316d70cf66ed646fcb42.tar.bz2
scummvm-rg350-296bad07b8dcd8de3fd5316d70cf66ed646fcb42.zip
STARTREK: Missing null-terminator with animations
Diffstat (limited to 'engines/startrek')
-rw-r--r--engines/startrek/startrek.cpp3
1 files changed, 2 insertions, 1 deletions
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)