]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fixed read order
authorDaniel Collin <daniel@collin.com>
Sat, 2 Nov 2019 09:21:07 +0000 (10:21 +0100)
committerDaniel Collin <daniel@collin.com>
Sat, 2 Nov 2019 09:21:07 +0000 (10:21 +0100)
cputest/main.c

index 41a5f82ae22e584a52b4cb579d509d8a937d6150..1ae98b91c4cfc2871968d8dd2d13320559b1f4cc 100644 (file)
@@ -1107,8 +1107,10 @@ static uae_u8 *validate_exception(struct registers *regs, uae_u8 *p, int excnum,
                        exc[0] = regs->sr >> 8;
                        exc[1] = regs->sr;
                        pl(exc + 2, regs->pc);
+                       const uae_u16 t0 = *p++;
+                       const uae_u16 t1 = *p++;
                        // frame type
-                       uae_u16 frame = ((*p++) << 8) | (*p++);
+                       uae_u16 frame = (t0 << 8) | t1;
                        exc[6] = frame >> 8;
                        exc[7] = frame >> 0;