From 851bc85860957c54740b94c5a61cb5100a1e19f9 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 13 Mar 2018 15:17:33 -0500 Subject: [PATCH] We should print the final line if from is still >= to This can happen if the region of to - from is not cleanly divisible by 16. --- src/vm_segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm_segment.c b/src/vm_segment.c index 9a6d2b8..74abe47 100644 --- a/src/vm_segment.c +++ b/src/vm_segment.c @@ -382,7 +382,7 @@ vm_segment_hexdump(vm_segment *seg, FILE *stream, size_t from, size_t to) ni += sprintf(nbuf + ni, " "); } - if (bytes >= 16) { + if (bytes >= 16 || from >= to) { fprintf(stream, "%08zX %s [%s]\n", from - bytes, nbuf, sbuf); bytes = 0; ni = 0;