diff --git a/Cargo.lock b/Cargo.lock index 8983f75..fbdf03c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1322,7 +1322,7 @@ dependencies = [ [[package]] name = "msg_tool" -version = "0.2.15" +version = "0.2.16" dependencies = [ "adler", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index e37206c..a271193 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "msg_tool" -version = "0.2.15" +version = "0.2.16" edition = "2024" repository = "https://github.com/lifegpc/msg-tool" description = "A command-line tool for exporting, importing, packing, and unpacking script files." diff --git a/src/ext/psb.rs b/src/ext/psb.rs index dcf668f..44bc05c 100644 --- a/src/ext/psb.rs +++ b/src/ext/psb.rs @@ -11,6 +11,7 @@ use emote_psb::types::string::*; use emote_psb::types::*; #[cfg(feature = "json")] use json::JsonValue; +#[cfg(feature = "json")] use json::number::Number; use serde::ser::SerializeStruct; use serde::{Deserialize, Serialize}; @@ -19,6 +20,7 @@ use std::collections::{BTreeMap, HashMap}; use std::io::{Read, Seek}; use std::ops::{Index, IndexMut}; +#[cfg(feature = "json")] fn f32_to_number(x: f32) -> Number { if !x.is_finite() { return Number::from_parts(true, 0, 0);