diff --git a/Cargo.lock b/Cargo.lock index 9c4ae45..ca67730 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,7 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "itunesdb" -version = "0.1.25" +version = "0.1.27" dependencies = [ "bincode", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index 977f8a8..cad2d6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "itunesdb" -version = "0.1.26" +version = "0.1.27" edition = "2021" authors = ["alterwain"] diff --git a/src/artworkdb.rs b/src/artworkdb.rs index 75b8a86..54a715d 100644 --- a/src/artworkdb.rs +++ b/src/artworkdb.rs @@ -68,10 +68,9 @@ pub mod deserializer { .unwrap() { let mut bytes = Vec::new(); - let str_end = u32::from_le_bytes(data[i+8..i+12].try_into().unwrap()) as usize; - let mut h = i+20; - info!("h: {}, end: {}", h, str_end); - while h < i+20+str_end { + let str_end = u32::from_le_bytes(data[i+12..i+16].try_into().unwrap()) as usize; + let mut h = i+24; + while h < i+24+str_end { bytes.push(u16::from_le_bytes(data[h..h+2].try_into().unwrap())); h+=2; }