fix hex dump from ending one byte early

This commit is contained in:
Intege-rs
2025-09-13 22:29:42 -04:00
parent b475d40910
commit 8607716cb8

View File

@@ -56,9 +56,8 @@ impl<'s, T: Scannable + ?Sized, R: RangeBounds<usize>> Display for HexDump<'s, T
for (mut addr, chunk) in ChunkIter::new(self.0, start) {
for chunk in chunk.chunks(16) {
if addr >= end { return Ok(()) }
let chunk = &chunk[..(end - addr).min(chunk.len())];
if addr > end { return Ok(()) }
let chunk = &chunk[..(1 + end - addr).min(chunk.len())];
//╶───╴Column╶────────────────────────────────╴