fix hex dump from ending one byte early
This commit is contained in:
1 parent
b475d40910
commit
8607716cb8
1 file changed
+2
-3
@@ -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╶────────────────────────────────╴
|
||||
|
||||
Reference in new issue
Block a user