1
0
mirror of https://github.com/pevans/erc-c.git synced 2025-04-05 06:37:42 +00:00

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.
This commit is contained in:
Peter Evans 2018-03-13 15:17:33 -05:00
parent ed32f73e98
commit 851bc85860

View File

@ -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;