Skip to content
Permalink
Browse files

nvapeek: Fixes for non-8-bit bytes.

  • Loading branch information
mwkmwkmwk committed Jan 15, 2017
1 parent b5fdc90 commit acb5deabe433129a171c22c1f50d204d1ec821f1
Showing with 4 additions and 4 deletions.
  1. +4 −4 nva/nvapeek.c
@@ -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.
You can’t perform that action at this time.