aboutsummaryrefslogtreecommitdiff
path: root/tui.c
diff options
context:
space:
mode:
Diffstat (limited to 'tui.c')
-rw-r--r--tui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tui.c b/tui.c
index 3a61c90..5bbbfdc 100644
--- a/tui.c
+++ b/tui.c
@@ -32,13 +32,13 @@ dumpmem(unsigned short *m)
wmove(code, 0, 0);
- for (i = 0; i < MEMSZ; i += 8) {
- if (++lines > 24)
- break;
+ for (lines = 0, i = 0; i < MEMSZ; i += 8) {
for (sum = 0, k = 0; k < 8; k++)
- sum += m[i + k];
+ sum |= m[i + k];
if (!sum)
continue;
+ if (++lines > 24)
+ break;
wprintw(code, "%4.4x:", i);
for (k = 0; k < 8; k++)
wprintw(code, "%5.4x", m[i + k]);