]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fixed "after" register output, again.
authorToni Wilen <twilen@winuae.net>
Thu, 17 Oct 2019 16:26:36 +0000 (19:26 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 17 Oct 2019 16:26:36 +0000 (19:26 +0300)
cputest/main.c

index ffeca06d1f7be9ce20f7f07f7b703741eff93b69..ab1de0876d6c04c430f44a0cdf8682430e27b0bf 100644 (file)
@@ -972,14 +972,12 @@ static void out_regs(struct registers *r, int before)
                *outbp++ = '\n';
        } else {
                // output only lines that have at least one modified register to save screen space
-               int outdone = 0;
                for (int i = 0; i < 4; i++) {
                        int diff = 0;
                        for (int j = 0; j < 4; j++) {
                                int idx = i * 4 + j;
                                if (test_regs.regs[idx] != regs.regs[idx]) {
                                        diff = 1;
-                                       outdone = 1;
                                }
                        }
                        if (diff) {
@@ -987,14 +985,12 @@ static void out_regs(struct registers *r, int before)
                                        int idx = i * 4 + j;
                                        if (j > 0)
                                                *outbp++ = ' ';
-                                       sprintf(outbp, "%c%d:%c%08lx", idx < 8 ? 'D' : 'A', idx & 7, test_regs.regs[idx] != last_registers.regs[idx] ? '*' : ' ', regs.regs[idx]);
+                                       sprintf(outbp, "%c%d:%c%08lx", idx < 8 ? 'D' : 'A', idx & 7, test_regs.regs[idx] != last_registers.regs[idx] ? '*' : ' ', test_regs.regs[idx]);
                                        outbp += strlen(outbp);
                                }
+                               *outbp++ = '\n';
                        }
                }
-               if (outdone) {
-                       *outbp++ = '\n';
-               }
        }
        sprintf(outbp, "SR:%c%04x   PC: %08lx ISP: %08lx", test_sr != last_registers.sr ? '*' : ' ', before ? test_sr : test_regs.sr, r->pc, r->ssp);
        outbp += strlen(outbp);