Skip to content

Commit

Permalink
nvapeek: Fixes for non-8-bit bytes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwkmwkmwk committed Jan 15, 2017
1 parent b5fdc90 commit acb5dea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nva/nvapeek.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ int main(int argc, char **argv) {
uint64_t z[16];
int e[16];
int s = 0;
for (i = j = 0; i < 16 && i < b; i+=rs.regsz/unit, j++) {
for (i = j = 0; i < 16/unit && i < b; i+=rs.regsz/unit, j++) {
e[j] = nva_rd(&rs, a+i, &z[j]);
if (e[j] || z[j])
s = 1;
}
if (s) {
ls = 1;
printf ("%08x:", a);
for (i = j = 0; i < 16 && i < b; i+=rs.regsz, j++) {
for (i = j = 0; i < 16/unit && i < b; i+=rs.regsz/unit, j++) {
nva_rsprint(&rs, e[j], z[j]);
}
printf ("\n");
} else {
if (ls) printf ("...\n"), ls = 0;
}
a+=16;
b-=16;
a+=16/unit;
b-=16/unit;
}
return 0;
}

0 comments on commit acb5dea

Please sign in to comment.