diff options
-rw-r--r-- | graphics/video/smk_player.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/video/smk_player.cpp b/graphics/video/smk_player.cpp index 298e9c6598..96ccd8e5e8 100644 --- a/graphics/video/smk_player.cpp +++ b/graphics/video/smk_player.cpp @@ -569,9 +569,11 @@ bool SMKPlayer::decodeNextFrame() { if (_header.audioInfo[i].hasAudio && chunkSize > 0 && i == 0) { // If it's track 0, play the audio data - byte *soundBuffer = new byte[chunkSize]; + byte *soundBuffer = new byte[chunkSize + 2]; _fileStream->read(soundBuffer, chunkSize); + soundBuffer[chunkSize] = 0; + soundBuffer[chunkSize + 1] = 0; if (_header.audioInfo[i].isCompressed) { // Compressed audio (Huffman DPCM encoded) |