fix(android): adjust the parsing of construction tables

This commit is contained in:
bfloat16 committed 2026-10-26 19:05:37 +08:00
1 parent ba1dacc0b2
commit 366a19c2a1
5 files changed
+822 -158

No files matched your search

@@ -16,6 +16,7 @@ fn wanted_id(command_id: u32) -> bool {
pub(crate) struct Artifact {
pub path: PathBuf,
pub size: u64,
pub entry_offset: Option<u32>,
}
pub(crate) fn load_artifacts(index_path: &Path) -> Result<BTreeMap<u32, Artifact>> {
@@ -47,6 +48,10 @@ pub(crate) fn load_artifacts(index_path: &Path) -> Result<BTreeMap<u32, Artifact
Artifact {
path: root.join(path),
size,
entry_offset: item
.get("entry_offset")
.and_then(Value::as_u64)
.and_then(|value| u32::try_from(value).ok()),
},
);
}
@@ -79,6 +84,10 @@ pub(crate) fn load_artifacts(index_path: &Path) -> Result<BTreeMap<u32, Artifact
Artifact {
path: root.join(path),
size,
entry_offset: record
.get("entry_offset")
.and_then(Value::as_u64)
.and_then(|value| u32::try_from(value).ok()),
},
);
}