diff options
author | Colin Snover | 2017-12-08 12:40:38 -0600 |
---|---|---|
committer | Colin Snover | 2017-12-08 12:41:16 -0600 |
commit | c21eccb51771e7fc1cd07783a87b2f1a5a2025c8 (patch) | |
tree | 6d276ac99b82ea1a3b9fa55c3e8d96da650fca24 | |
parent | c5f67ac471cb72e4ccf587f0d7473de735110246 (diff) | |
download | scummvm-rg350-c21eccb51771e7fc1cd07783a87b2f1a5a2025c8.tar.gz scummvm-rg350-c21eccb51771e7fc1cd07783a87b2f1a5a2025c8.tar.bz2 scummvm-rg350-c21eccb51771e7fc1cd07783a87b2f1a5a2025c8.zip |
SKY: Fix setSub incorrectly falling through to subsequent cases
-rw-r--r-- | engines/sky/compact.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index 13ea300942..ec434621d5 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -338,20 +338,28 @@ void SkyCompact::setSub(Compact *cpt, uint16 mode, uint16 value) { switch (mode) { case 0: cpt->baseSub = value; + return; case 2: cpt->baseSub_off = value; + return; case 4: cpt->actionSub = value; + return; case 6: cpt->actionSub_off = value; + return; case 8: cpt->getToSub = value; + return; case 10: cpt->getToSub_off = value; + return; case 12: cpt->extraSub = value; + return; case 14: cpt->extraSub_off = value; + return; default: error("Invalid Mode (%d)", mode); } |