mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-07-08 01:31:53 +08:00
Fix unsupported TJS/ns0 value type 5
This commit is contained in:
@@ -58,6 +58,7 @@ impl ScriptBuilder for TjsNs0Builder {
|
|||||||
enum TjsValue {
|
enum TjsValue {
|
||||||
Void(()),
|
Void(()),
|
||||||
Int(i64),
|
Int(i64),
|
||||||
|
Double(f64),
|
||||||
Str(String),
|
Str(String),
|
||||||
Array(Vec<TjsValue>),
|
Array(Vec<TjsValue>),
|
||||||
Dict(BTreeMap<String, TjsValue>),
|
Dict(BTreeMap<String, TjsValue>),
|
||||||
@@ -80,6 +81,7 @@ impl StructUnpack for TjsValue {
|
|||||||
0 => TjsValue::Void(()),
|
0 => TjsValue::Void(()),
|
||||||
2 => TjsValue::Str(unpack_string(reader, big, encoding)?),
|
2 => TjsValue::Str(unpack_string(reader, big, encoding)?),
|
||||||
4 => TjsValue::Int(i64::unpack(reader, big, encoding)?),
|
4 => TjsValue::Int(i64::unpack(reader, big, encoding)?),
|
||||||
|
5 => TjsValue::Double(f64::unpack(reader, big, encoding)?),
|
||||||
0x81 => {
|
0x81 => {
|
||||||
let arr_len = u32::unpack(reader, big, encoding)? as usize;
|
let arr_len = u32::unpack(reader, big, encoding)? as usize;
|
||||||
let mut arr = Vec::with_capacity(arr_len);
|
let mut arr = Vec::with_capacity(arr_len);
|
||||||
|
|||||||
Reference in New Issue
Block a user