summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2017-05-01 23:54:36 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2017-05-01 23:54:36 +0300
commit53cabb8906f69c2fcecaeb36d18d41c61bc3e85a (patch)
tree6f3d933c3dad58462fc40375b6c8334cd4237a38
parentd90b07b0ff51dddc148dcb5675fabb84fc49b101 (diff)
dump.c: Fix print_array when data ends on 8 column
-rw-r--r--src/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dump.c b/src/dump.c
index 698fc55..8634b72 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -103,7 +103,7 @@ print_array(const uint8_t *buf, const size_t size, const size_t nmemb, void (*fu
fun(buf + n * size, size);
printf("%s", (nmemb > 1 && n + 1 < nmemb ? ", " : ""));
- if (!((n + 1) % 8))
+ if (n + 1 < nmemb && !((n + 1) % 8))
printf("\n%*s", indent, "");
}