mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-29 22:04:25 +02:00
ensure complex resource entry
This commit is contained in:
parent
004f7fc6f1
commit
21c9d4e6bb
@ -29,6 +29,13 @@ public class EntryArray extends OffsetBlockArray<Entry> implements JSONConvert<J
|
||||
public EntryArray(IntegerArray offsets, IntegerItem itemCount, IntegerItem itemStart){
|
||||
super(offsets, itemCount, itemStart);
|
||||
}
|
||||
public boolean hasComplexEntry(){
|
||||
Entry first = iterator(true).next();
|
||||
if(first==null){
|
||||
return false;
|
||||
}
|
||||
return first.isComplex();
|
||||
}
|
||||
public boolean isEmpty(){
|
||||
return !iterator(true).hasNext();
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public class TypeBlock extends Chunk<TypeHeader>
|
||||
.getSpecStringPool().getOrCreate(name);
|
||||
Entry entry = getOrCreateEntry((short) id);
|
||||
if(entry.isNull()){
|
||||
entry.setValueAsRaw(ValueType.NULL, 0);
|
||||
entry.ensureComplex(getEntryArray().hasComplexEntry());
|
||||
}
|
||||
entry.setSpecReference(specString.getIndex());
|
||||
return entry;
|
||||
|
@ -37,6 +37,9 @@
|
||||
super();
|
||||
}
|
||||
|
||||
public void ensureComplex(boolean isComplex){
|
||||
ensureTableEntry(isComplex);
|
||||
}
|
||||
public int getId(){
|
||||
return getIndex();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user