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

digitall noreply at scummvm.org
Thu Jun 23 22:22:51 UTC 2022


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:
e123d86704 GLK: SCOTT: Fix Likely Incorrect Fallthrough in UNP64 6502 Emulator Code


Commit: e123d8670455fce4e30ba8fa1898880379a9b4b2
    https://github.com/scummvm/scummvm/commit/e123d8670455fce4e30ba8fa1898880379a9b4b2
Author: D G Turner (digitall at scummvm.org)
Date: 2022-06-23T23:21:37+01:00

Commit Message:
GLK: SCOTT: Fix Likely Incorrect Fallthrough in UNP64 6502 Emulator Code

Changed paths:
    engines/glk/scott/disk_image.cpp
    engines/glk/scott/load_game.cpp
    engines/glk/scott/unp64/6502_emu.cpp


diff --git a/engines/glk/scott/disk_image.cpp b/engines/glk/scott/disk_image.cpp
index deb7e21d27d..389f105bb5a 100644
--- a/engines/glk/scott/disk_image.cpp
+++ b/engines/glk/scott/disk_image.cpp
@@ -764,6 +764,7 @@ DiskImage *diCreateFromData(uint8_t *data, int length) {
 	switch (length) {
 	case D64ERRSIZE: /* D64 with error info */
 		// di->_errinfo = &(di->_error_);
+		// fallthrough
 	case D64SIZE: /* standard D64 */
 		di->_type = D64;
 		di->_bam._track = 18;
@@ -773,6 +774,7 @@ DiskImage *diCreateFromData(uint8_t *data, int length) {
 
 	case D71ERRSIZE: /* D71 with error info */
 		di->_errinfo = &(di->_image[D71SIZE]);
+		// fallthrough
 	case D71SIZE:
 		di->_type = D71;
 		di->_bam._track = 18;
@@ -784,6 +786,7 @@ DiskImage *diCreateFromData(uint8_t *data, int length) {
 
 	case D81ERRSIZE: /* D81 with error info */
 		di->_errinfo = &(di->_image[D81SIZE]);
+		// fallthrough
 	case D81SIZE:
 		di->_type = D81;
 		di->_bam._track = 40;
diff --git a/engines/glk/scott/load_game.cpp b/engines/glk/scott/load_game.cpp
index f7900bbe19d..c757924fc63 100644
--- a/engines/glk/scott/load_game.cpp
+++ b/engines/glk/scott/load_game.cpp
@@ -174,6 +174,7 @@ void loadGameFile(Common::SeekableReadStream *f) {
 		break;
 	case SAVAGE_ISLAND_C64:
 		_G(_items)[20]._image = 13;
+		// fallthrough
 	case SAVAGE_ISLAND2_C64:
 		_G(_sys)[IM_DEAD] = "I'm DEAD!! ";
 		if (CURRENT_GAME == SAVAGE_ISLAND2_C64)
@@ -181,8 +182,10 @@ void loadGameFile(Common::SeekableReadStream *f) {
 		break;
 	case SAVAGE_ISLAND:
 		_G(_items)[20]._image = 13;
+		// fallthrough
 	case SAVAGE_ISLAND2:
 		MY_LOC = 30; /* Both parts of Savage Island begin in room 30 */
+		// fallthrough
 	case GREMLINS_GERMAN:
 	case GREMLINS:
 	case SUPERGRAN:
diff --git a/engines/glk/scott/unp64/6502_emu.cpp b/engines/glk/scott/unp64/6502_emu.cpp
index 3d375b4dc61..3d94c31dd02 100644
--- a/engines/glk/scott/unp64/6502_emu.cpp
+++ b/engines/glk/scott/unp64/6502_emu.cpp
@@ -1179,10 +1179,15 @@ int nextInst(CpuCtx* r) {
 					switch (opCode) {
 					case 0x8D:
 						_G(_byted011)[0] = r->_a & 0x7f;
+						break;
 					case 0x8E:
 						_G(_byted011)[0] = r->_x & 0x7f;
+						break;
 					case 0x8C:
 						_G(_byted011)[0] = r->_y & 0x7f;
+						break;
+					default:
+						break;
 					}
 				}
 				WriteToIO = 1;




More information about the Scummvm-git-logs mailing list