From 430db6719f2bdded9428932c858db810d291b12b Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 17 Apr 2013 23:54:21 +0200 Subject: SCI: Fix confusing use of strncpy --- engines/sci/sound/drivers/midi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') 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); } -- cgit v1.2.3