about summary refs log tree commit diff
path: root/gifprobe/src/main.rs
diff options
context:
space:
mode:
authorGenny <gen@nyble.dev>2022-11-25 01:40:21 -0600
committerGenny <gen@nyble.dev>2022-11-25 01:40:21 -0600
commit8291bcdd8e4ba32b204b1bef61725fe590a5d539 (patch)
tree88e1c7f0d15f99ca9a5ef212f4decf8039655d29 /gifprobe/src/main.rs
parent3068091f9bf05a48e2f20806ca22368188b56a7a (diff)
downloadgifed-8291bcdd8e4ba32b204b1bef61725fe590a5d539.tar.gz
gifed-8291bcdd8e4ba32b204b1bef61725fe590a5d539.zip
gifprobe: more offsets
Diffstat (limited to 'gifprobe/src/main.rs')
-rw-r--r--gifprobe/src/main.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/gifprobe/src/main.rs b/gifprobe/src/main.rs
index 2f5c025..60bca13 100644
--- a/gifprobe/src/main.rs
+++ b/gifprobe/src/main.rs
@@ -68,7 +68,6 @@ fn main() {
 				let dispose_string = if let Some(dispose) = gce.disposal_method() {
 					dispose.to_string()
 				} else {
-					String::from("Reserved Value!");
 					format!("Reserved: {:b}", gce.packed().disposal_method())
 				};
 
@@ -83,7 +82,10 @@ fn main() {
 			}
 			Block::LoopingExtension(_) => todo!(),
 			Block::CommentExtension(cmt) => {
-				println!("Comment Extension\n\tLength {}", cmt.len().yellow());
+				print!("Comment Extension");
+				print_offset(offset);
+
+				println!("\tLength {}", cmt.len().yellow());
 
 				match String::from_utf8(cmt) {
 					Ok(cmt) => println!("\tString \"{}\"", cmt.yellow()),
@@ -94,8 +96,11 @@ fn main() {
 				let auth = app.authentication_code();
 				let app_ident = String::from_utf8_lossy(app.identifier());
 
+				print!("Application Extension");
+				print_offset(offset);
+
 				println!(
-					"Application Extension\n\tIdentifier {}\n\tAuthentication {:02X} {:02X} {:02X}",
+					"\tIdentifier {}\n\tAuthentication {:02X} {:02X} {:02X}",
 					app_ident.yellow(),
 					auth[0].yellow(),
 					auth[1].yellow(),
@@ -170,7 +175,7 @@ fn print_offset(offset: Range<usize>) {
 	print_usize(offset.start);
 	print!(" … ");
 	print_usize(offset.end);
-	println!("]");
+	println!("] ");
 }
 
 fn print_usize(offset: usize) {