aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/advsys/vm.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/advsys/vm.h')
-rw-r--r--engines/glk/advsys/vm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/glk/advsys/vm.h b/engines/glk/advsys/vm.h
index 76f05de691..58689170e1 100644
--- a/engines/glk/advsys/vm.h
+++ b/engines/glk/advsys/vm.h
@@ -253,7 +253,9 @@ private:
* Gets the next code word and increases the PC counter to after it
*/
int readCodeWord() {
- return getCodeWord(_pc += 2);
+ int v = getCodeWord(_pc);
+ _pc += 2;
+ return v;
}
/**