mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-05-03 15:44:27 +02:00
fix unsigned short id
This commit is contained in:
parent
2bcbf76f2f
commit
b503df9890
@ -36,20 +36,25 @@ public class EntryBlockArray extends OffsetBlockArray<EntryBlock> implements JSO
|
|||||||
return !iterator(true).hasNext();
|
return !iterator(true).hasNext();
|
||||||
}
|
}
|
||||||
public void setEntry(short entryId, EntryBlock entryBlock){
|
public void setEntry(short entryId, EntryBlock entryBlock){
|
||||||
setItem(entryId, entryBlock);
|
setItem(0xffff & entryId, entryBlock);
|
||||||
}
|
}
|
||||||
public EntryBlock getOrCreate(short entryId){
|
public EntryBlock getOrCreate(short entryId){
|
||||||
EntryBlock entryBlock=get(entryId);
|
int id = 0xffff & entryId;
|
||||||
|
EntryBlock entryBlock=get(id);
|
||||||
if(entryBlock!=null){
|
if(entryBlock!=null){
|
||||||
return entryBlock;
|
return entryBlock;
|
||||||
}
|
}
|
||||||
int count=entryId+1;
|
int count=id+1;
|
||||||
ensureSize(count);
|
ensureSize(count);
|
||||||
refreshCount();
|
refreshCount();
|
||||||
return get(entryId);
|
return get(id);
|
||||||
|
}
|
||||||
|
public EntryBlock get(short entryId){
|
||||||
|
int index = 0xffff & entryId;
|
||||||
|
return super.get(index);
|
||||||
}
|
}
|
||||||
public EntryBlock getEntry(short entryId){
|
public EntryBlock getEntry(short entryId){
|
||||||
return get(entryId);
|
return get(0xffff & entryId);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public EntryBlock newInstance() {
|
public EntryBlock newInstance() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user