aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
/*--------------------------------------------------------------------------*/