diff options
Diffstat (limited to 'engines/gob/sound')
-rw-r--r-- | engines/gob/sound/adlib.cpp | 2 | ||||
-rw-r--r-- | engines/gob/sound/cdrom.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index 28123668cc..d643ae511b 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -240,7 +240,7 @@ void AdLib::setKey(byte voice, byte note, bool on, bool spec) { freq = _freqs[_notLin[voice]][note - octa * 12]; writeOPL(0xA0 + voice, freq & 0xFF); - writeOPL(0xB0 + voice, (freq >> 8) | (octa << 2) | 0x20 * on); + writeOPL(0xB0 + voice, (freq >> 8) | (octa << 2) | (0x20 * (on ? 1 : 0))); if (!freq) warning("AdLib::setKey Voice %d, note %02X unknown", voice, note); diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp index 8f0b1df23e..2e1673b12a 100644 --- a/engines/gob/sound/cdrom.cpp +++ b/engines/gob/sound/cdrom.cpp @@ -24,12 +24,12 @@ */ #include "common/endian.h" +#include "common/str.h" #include "common/util.h" #include "sound/audiocd.h" #include "gob/gob.h" #include "gob/sound/cdrom.h" -#include "gob/helper.h" #include "gob/dataio.h" namespace Gob { @@ -92,7 +92,7 @@ void CDROM::startTrack(const char *trackName) { return; } - strncpy0(_curTrack, trackName, 15); + Common::strlcpy(_curTrack, trackName, 16); stopPlaying(); _curTrackBuffer = matchPtr; |