diff --git a/Cargo.lock b/Cargo.lock index 372fb4a..8ed55e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -697,9 +697,9 @@ dependencies = [ [[package]] name = "jomini" -version = "0.34.0" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24622a86da2f450d0b3eebcf925a33c9541e520daab442f9b2756430959ea772" +checksum = "7c7674b19c84addd10c6e31ffe84ecdecff8025dab81bdbc6eab979107ca9e11" dependencies = [ "flate2", "itoa", diff --git a/Cargo.toml b/Cargo.toml index d1fbd89..fc461fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" publish = false [dependencies] -jomini = { version = "0.34", features = ["envelope"] } +jomini = { version = "0.34.1", features = ["envelope"] } ck3save = { git = "https://github.com/rakaly/ck3save.git", default-features = false } eu4save = { git = "https://github.com/rakaly/eu4save.git" } eu5save = { git = "https://github.com/pdx-tools/pdx-tools" } diff --git a/src/json.rs b/src/json.rs index 577baa6..3ecda38 100644 --- a/src/json.rs +++ b/src/json.rs @@ -154,8 +154,9 @@ impl JsonCommand { return Err(anyhow!("Unexpected file kind after melting")); }; - let data = txt.body().get_ref(); - let tape = TextTape::from_slice(data.get_ref())?; + let all = txt.body().get_ref().get_ref().as_slice(); + let body = &all[txt.body().content_offset() as usize..]; + let tape = TextTape::from_slice(body)?; tape.utf8_reader() .json() .with_options(options)