From 53cabb8906f69c2fcecaeb36d18d41c61bc3e85a Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 1 May 2017 23:54:36 +0300 Subject: dump.c: Fix print_array when data ends on 8 column --- src/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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, ""); } -- cgit v1.2.3-70-g09d2