aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-29 01:27:15 +0000
committerFilippos Karapetis2009-12-29 01:27:15 +0000
commita6aa3d6363b95422581eef80958246154b9b98be (patch)
tree34a6ed812d3c554ddea8bbd8230914875bcfb53a /engines/sci
parent53068b9e429b90c4fe1618aa49dd960ba8976286 (diff)
downloadscummvm-rg350-a6aa3d6363b95422581eef80958246154b9b98be.tar.gz
scummvm-rg350-a6aa3d6363b95422581eef80958246154b9b98be.tar.bz2
scummvm-rg350-a6aa3d6363b95422581eef80958246154b9b98be.zip
Better checking for the cmdMuteSound and cmdVolume special cases
svn-id: r46699
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sfx/soundcmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index 7c0ceba982..74efeb43d5 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -213,8 +213,10 @@ reg_t SoundCommandParser::parseCommand(int argc, reg_t *argv, reg_t acc) {
// cmdMuteSound and cmdVolume do not operate on an object, but need the number of
// arguments passed. We load this in the value
- if (obj.isNull())
+ if (!strcmp(_soundCommands[command]->desc, "cmdMuteSound") ||
+ !strcmp(_soundCommands[command]->desc, "cmdVolume")) {
value = argc - 1; // minus the command
+ }
if (argc == 6) { // cmdSendMidi
byte channel = argv[2].toUint16() & 0xf;