aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-04-17 23:54:21 +0200
committerWillem Jan Palenstijn2013-04-17 23:55:01 +0200
commit430db6719f2bdded9428932c858db810d291b12b (patch)
tree78b92e4072da0143ec2a966403c4caaa79cddd36 /engines/sci/sound
parentb1534913c10f2a33746f465ac219058018fa33a8 (diff)
downloadscummvm-rg350-430db6719f2bdded9428932c858db810d291b12b.tar.gz
scummvm-rg350-430db6719f2bdded9428932c858db810d291b12b.tar.bz2
scummvm-rg350-430db6719f2bdded9428932c858db810d291b12b.zip
SCI: Fix confusing use of strncpy
Diffstat (limited to 'engines/sci/sound')
-rw-r--r--engines/sci/sound/drivers/midi.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index a3d01753ff..a31d5f9a81 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -913,7 +913,8 @@ int MidiPlayer_Midi::open(ResourceManager *resMan) {
if (res) {
if (isMt32GmPatch(res->data, res->size)) {
readMt32GmPatch(res->data, res->size);
- strncpy((char *)_goodbyeMsg, " ScummVM ", 20);
+ // Note that _goodbyeMsg is not zero-terminated
+ memcpy(_goodbyeMsg, " ScummVM ", 20);
} else {
readMt32Patch(res->data, res->size);
}