aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2019-06-16 14:48:53 -0700
committerPaul Gilbert2019-06-16 14:59:26 -0700
commit611bea7d735df4e318001a6fb3cc5c398fc7dcf6 (patch)
treee18dc26a2efadb1b8468c68108eace24a81a1a46 /engines
parent919670a565ca38162346beb77414562d6126273a (diff)
downloadscummvm-rg350-611bea7d735df4e318001a6fb3cc5c398fc7dcf6.tar.gz
scummvm-rg350-611bea7d735df4e318001a6fb3cc5c398fc7dcf6.tar.bz2
scummvm-rg350-611bea7d735df4e318001a6fb3cc5c398fc7dcf6.zip
GLK: ADVSYS: Fix savegame area setup
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/advsys/advsys.cpp5
-rw-r--r--engines/glk/advsys/game.cpp4
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/glk/advsys/advsys.cpp b/engines/glk/advsys/advsys.cpp
index ff0bf62116..4e2451e79b 100644
--- a/engines/glk/advsys/advsys.cpp
+++ b/engines/glk/advsys/advsys.cpp
@@ -97,13 +97,16 @@ bool AdvSys::singleAction() {
if (execute(_afterOffset) == ABORT)
return false;
break;
+
+ default:
+ break;
}
return true;
}
Common::Error AdvSys::readSaveData(Common::SeekableReadStream *rs) {
- if ((int)rs->size() != _saveSize)
+ if (rs->size() != (int)_saveSize)
return Common::kReadingFailed;
rs->read(_saveArea, rs->size());
diff --git a/engines/glk/advsys/game.cpp b/engines/glk/advsys/game.cpp
index d051a352b6..eca145176c 100644
--- a/engines/glk/advsys/game.cpp
+++ b/engines/glk/advsys/game.cpp
@@ -28,8 +28,8 @@ namespace Glk {
namespace AdvSys {
void Decrypter::decrypt(byte *data, size_t size) {
- for (; --size; ++data)
- *data = ~(*data + 30);
+ for (size_t idx = 0; idx < size; ++idx)
+ *data++ = ~(*data + 30);
}
/*--------------------------------------------------------------------------*/