mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-05-01 14:44:27 +02:00
synchronise update "value string" & "data string" of xml attribute #23
This commit is contained in:
parent
0c4668ee7f
commit
22d4fb9b5d
@ -208,12 +208,25 @@
|
||||
return getInteger(getBytesInternal(), OFFSET_STRING);
|
||||
}
|
||||
void setValueStringReference(int ref){
|
||||
if(ref == getValueStringReference()){
|
||||
if(ref == getValueStringReference() && mValueStringReference!=null){
|
||||
return;
|
||||
}
|
||||
StringPool<?> stringPool = getStringPool();
|
||||
if(stringPool == null){
|
||||
return;
|
||||
}
|
||||
StringItem stringItem = stringPool.get(ref);
|
||||
unlink(mValueStringReference);
|
||||
if(stringItem!=null){
|
||||
ref = stringItem.getIndex();
|
||||
}
|
||||
putInteger(getBytesInternal(), OFFSET_STRING, ref);
|
||||
mValueStringReference = link(OFFSET_STRING);
|
||||
ReferenceItem referenceItem = null;
|
||||
if(stringItem!=null){
|
||||
referenceItem = new ReferenceBlock<>(this, OFFSET_STRING);
|
||||
stringItem.addReference(referenceItem);
|
||||
}
|
||||
mValueStringReference = referenceItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user