GLK: ADVSYS: Fix savegame area setup

This commit is contained in:
Paul Gilbert 2019-06-16 14:48:53 -07:00
parent 919670a565
commit 611bea7d73
2 changed files with 6 additions and 3 deletions

View File

@ -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());

View File

@ -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);
}
/*--------------------------------------------------------------------------*/