[Scummvm-git-logs] scummvm master -> c21eccb51771e7fc1cd07783a87b2f1a5a2025c8

csnover csnover at users.noreply.github.com
Fri Dec 8 19:41:36 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c21eccb517 SKY: Fix setSub incorrectly falling through to subsequent cases


Commit: c21eccb51771e7fc1cd07783a87b2f1a5a2025c8
    https://github.com/scummvm/scummvm/commit/c21eccb51771e7fc1cd07783a87b2f1a5a2025c8
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-12-08T12:41:16-06:00

Commit Message:
SKY: Fix setSub incorrectly falling through to subsequent cases

Changed paths:
    engines/sky/compact.cpp


diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index 13ea300..ec43462 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);
 	}





More information about the Scummvm-git-logs mailing list