about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-03-22 21:27:32 -0700
committerKartik Agaram <vc@akkartik.com>2019-03-22 21:27:32 -0700
commit9be1aa30d8c32c7750c9ae9e73b4caa1037a7a5b (patch)
treee3edebf89511446a4fff96df47dd2453f9b45d11
parent5c5e4a48b42f9a05f232c97bc8e2c212cfc078e5 (diff)
downloadmu-9be1aa30d8c32c7750c9ae9e73b4caa1037a7a5b.tar.gz
5015
-rw-r--r--subx/011run.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/subx/011run.cc b/subx/011run.cc
index da5af920..6b18ca06 100644
--- a/subx/011run.cc
+++ b/subx/011run.cc
@@ -364,10 +364,8 @@ case 0x05: {  // add imm32 to EAX
 :(code)
 // read a 32-bit int in little-endian order from the instruction stream
 int32_t next32() {
-  int32_t result = next();
-  result |= (next()<<8);
-  result |= (next()<<16);
-  result |= (next()<<24);
+  int32_t result = read_mem_i32(EIP);
+  EIP+=4;
   return result;
 }