From 7bbbaf7d8cc382dd3c6dfc6dcaacf9c902523525 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 25 May 2010 11:35:16 +0000 Subject: Patch #3006178: "rjp1: calculate sample length correctly" Fixes bug #3001110: "FOTAQ Amiga: crashes reporting assertion failure" Added a NEWS entry to the patch. svn-id: r49210 --- NEWS | 1 + sound/mods/rjp1.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5d48d8e4e4..9ab98dc4e5 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see: General: - Switched to the "fast" DOSBox OPL emulator. + - Fixed a crash in the rjp1 player code affecting the FOTAQ Amiga version. 1.1.2 (????-??-??) Broken Sword 2 diff --git a/sound/mods/rjp1.cpp b/sound/mods/rjp1.cpp index fc1b49e9e9..be376d61a4 100644 --- a/sound/mods/rjp1.cpp +++ b/sound/mods/rjp1.cpp @@ -422,7 +422,7 @@ void Rjp1::setupNote(Rjp1Channel *channel, int16 period) { channel->envelopeMode = 4; channel->data = channel->waveData; channel->pos = READ_BE_UINT16(note + 16); - channel->len = READ_BE_UINT16(note + 18); + channel->len = channel->pos + READ_BE_UINT16(note + 18); channel->setupNewNote = true; } } -- cgit v1.2.3