Skip to content

Commit b0b95e5

Browse files
committed
Not printing the "extra" lines
1 parent 80d1eb5 commit b0b95e5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Options:
1111
-t, --target <TARGET> Filename + optional offset
1212
-c, --current <CURRENT> Filename + optional offset
1313
-x, --addr <ADDR> Virtual address
14-
-l, --length <LENGTH> Number of bytes to compare (default: all)
14+
-l, --length <LENGTH> Number of bytes to compare (default: until EOF)
1515
-a, --arch <ARCH> Architecture
1616
-m, --mode <MODE> Mode
1717
-e, --endianness <ENDIANNESS> Endianness (default: little)

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ fn main() {
6161
}
6262

6363
for i in min_size..max_size {
64-
if current.len() < min_size {
64+
if current.len() > i {
6565
print!("{}{}", current[i], " ".repeat(ALIGNMENT - current[i].len()));
6666
} else {
6767
print!("{}", " ".repeat(ALIGNMENT));
6868
}
69-
if target.len() < min_size {
69+
if target.len() > i {
7070
print!("{}", target[i]);
7171
}
7272
println!("");

0 commit comments

Comments
 (0)