mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 11:38:08 +00:00
android-res: mark the table partial when library records are omitted
Library records past their chunk or beyond the 256-record cap are not read, so the table is partial. Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
This commit is contained in:
@@ -459,6 +459,9 @@ fn parse_package(data: &[u8], pos: usize, cs: usize, global: &StringPool, table:
|
||||
if n > available {
|
||||
table.warnings.push(format!("package {name}: library records run past their chunk"));
|
||||
}
|
||||
if n > available.min(256) {
|
||||
table.truncated = true;
|
||||
}
|
||||
for i in 0..n.min(256).min(available) {
|
||||
let e = c + ch + i * 260;
|
||||
if let Some(lid) = r.u32_le(e) {
|
||||
|
||||
Reference in New Issue
Block a user