mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-29 22:04:25 +02:00
fix: decode null / empty values
This commit is contained in:
parent
d5c3f7563e
commit
fea0583f61
@ -64,7 +64,7 @@ import java.util.regex.Pattern;
|
||||
return null;
|
||||
}
|
||||
if("@empty".equals(txt)){
|
||||
return new EncodeResult(ValueType.NULL, 0);
|
||||
return new EncodeResult(ValueType.NULL, 1);
|
||||
}
|
||||
if("@null".equals(txt)){
|
||||
return new EncodeResult(ValueType.REFERENCE, 0);
|
||||
@ -355,7 +355,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
public static String decodeIntEntry(EntryStore store, Entry parentEntry, ValueType valueType, int data){
|
||||
if(valueType == ValueType.NULL){
|
||||
return "@empty";
|
||||
return decodeNull(data);
|
||||
}
|
||||
if(valueType==ValueType.STRING){
|
||||
return decodeIntEntryString(parentEntry, data);
|
||||
@ -474,6 +474,8 @@ import java.util.regex.Pattern;
|
||||
return decodeHex(data);
|
||||
case INT_DEC:
|
||||
return decodeInt(data);
|
||||
case NULL:
|
||||
return decodeNull(data);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -713,6 +715,12 @@ import java.util.regex.Pattern;
|
||||
private static String decodeInt(int rawVal){
|
||||
return String.valueOf(rawVal);
|
||||
}
|
||||
private static String decodeNull(int data){
|
||||
if(data == 1){
|
||||
return "@empty";
|
||||
}
|
||||
return "@null";
|
||||
}
|
||||
|
||||
private static String decodeBoolean(int data){
|
||||
if(data == 0xFFFFFFFF){
|
||||
|
Loading…
x
Reference in New Issue
Block a user