summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index fb030d0..13f15d3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -21,7 +21,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
> 0
} {
// write index
- print!("{:010}: ", idx);
+ print!("{:010}: ", idx * CHUNK_SIZE);
+ idx += 1;
// write hex
for byte in &chunk {
@@ -30,7 +31,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// write ascii
println!("{}", String::from_utf8_lossy(&chunk).replace('\n', "⏎"));
- idx += CHUNK_SIZE;
chunk.clear();
}