diff options
author | Paul Gilbert | 2019-07-06 18:20:03 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-07-06 18:20:03 -0700 |
commit | b288640d90d72f950ffcfe2cd413779443b666ba (patch) | |
tree | 7d8fc0deee50a92836f91f3824e67a0a3b4807e2 | |
parent | 2fd5d82078605b17d59343dd2f6b55d75e86601b (diff) | |
download | scummvm-rg350-b288640d90d72f950ffcfe2cd413779443b666ba.tar.gz scummvm-rg350-b288640d90d72f950ffcfe2cd413779443b666ba.tar.bz2 scummvm-rg350-b288640d90d72f950ffcfe2cd413779443b666ba.zip |
GLK: ALAN3: Another attempt at an openpandora fix
-rw-r--r-- | engines/glk/alan2/alan2.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp index 9b2478fd4f..4168ca26b9 100644 --- a/engines/glk/alan2/alan2.cpp +++ b/engines/glk/alan2/alan2.cpp @@ -157,14 +157,15 @@ static void syncObjects(Common::Serializer &s) { } static void syncEventQueue(Common::Serializer &s) { + int i; if (s.isSaving()) { eventq[etop].time = 0; // Mark the top - for (int i = 0; i <= etop; ++i) + for (i = 0; i <= etop; ++i) eventq[i].synchronize(s); } else { - for (etop = 0; eventq[etop - 1].time; ++etop) - eventq[etop].synchronize(s); - --etop; + for (i = 0; eventq[i - 1].time; ++i) + eventq[i].synchronize(s); + etop = i - 1; } } |