diff options
author | Torbjörn Andersson | 2005-08-30 12:25:15 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-08-30 12:25:15 +0000 |
commit | df7f81c9055328adf5ed69b9e6786ff3593caba4 (patch) | |
tree | 6f087361c9e9660107c11c790931df4810e3bfc8 /saga | |
parent | ea4d3fcca16e6e4e624542d42a48100f11052ba2 (diff) | |
download | scummvm-rg350-df7f81c9055328adf5ed69b9e6786ff3593caba4.tar.gz scummvm-rg350-df7f81c9055328adf5ed69b9e6786ff3593caba4.tar.bz2 scummvm-rg350-df7f81c9055328adf5ed69b9e6786ff3593caba4.zip |
The intro asks to play song number 0. I'm almost sure that the music that
is supposed to play at this point has resource number 32. _songTable[0]
contains the value 32 at this point, so song 0 is probably a valid music
request, and not a request to stop the music.
At the other end of the list, I believe the song number has to be *less*
than _songTableLen, not less or equal to it.
But feel free to revert this change if I'm messing things up.
svn-id: r18719
Diffstat (limited to 'saga')
-rw-r--r-- | saga/sfuncs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index ec0020967c..32b1f14ae5 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1643,13 +1643,13 @@ void Script::sfPlayMusic(SCRIPTFUNC_PARAMS) { int16 param1 = thread->pop(); int16 param2 = thread->pop(); - if (param1 < 1) { + if (param1 < 0) { _vm->_music->stop(); return; } - if (param1 > _vm->_music->_songTableLen) { - warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen); + if (param1 >= _vm->_music->_songTableLen) { + warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen - 1); } else { _vm->_music->setVolume(-1, 1); _vm->_music->play(_vm->_music->_songTable[param1], param2 ? MUSIC_LOOP: MUSIC_NORMAL); |