mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-30 22:34:24 +02:00
fix: Check proper config size
This commit is contained in:
parent
8e5afcd4ae
commit
fcee142be9
@ -279,7 +279,7 @@ public class ResConfig extends FixedBlockContainer
|
|||||||
setDensity((short) ResConfigHelper.encodeDensity(density));
|
setDensity((short) ResConfigHelper.encodeDensity(density));
|
||||||
}
|
}
|
||||||
public void setKeyboard(byte b){
|
public void setKeyboard(byte b){
|
||||||
if(getConfigSize()<SIZE_16){
|
if(getConfigSize()<SIZE_28){
|
||||||
if(b==0){
|
if(b==0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -288,7 +288,7 @@ public class ResConfig extends FixedBlockContainer
|
|||||||
mValuesContainer.put(OFFSET_keyboard, b);
|
mValuesContainer.put(OFFSET_keyboard, b);
|
||||||
}
|
}
|
||||||
public byte getKeyboardByte(){
|
public byte getKeyboardByte(){
|
||||||
if(getConfigSize()<SIZE_16){
|
if(getConfigSize()<SIZE_28){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return mValuesContainer.get(OFFSET_keyboard);
|
return mValuesContainer.get(OFFSET_keyboard);
|
||||||
@ -304,7 +304,7 @@ public class ResConfig extends FixedBlockContainer
|
|||||||
setKeyboard(b);
|
setKeyboard(b);
|
||||||
}
|
}
|
||||||
public void setNavigation(byte b){
|
public void setNavigation(byte b){
|
||||||
if(getConfigSize()<SIZE_16){
|
if(getConfigSize()<SIZE_28){
|
||||||
if(b==0){
|
if(b==0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -313,7 +313,7 @@ public class ResConfig extends FixedBlockContainer
|
|||||||
mValuesContainer.put(OFFSET_navigation, b);
|
mValuesContainer.put(OFFSET_navigation, b);
|
||||||
}
|
}
|
||||||
public byte getNavigationByte(){
|
public byte getNavigationByte(){
|
||||||
if(getConfigSize()<SIZE_16){
|
if(getConfigSize()<SIZE_28){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return mValuesContainer.get(OFFSET_navigation);
|
return mValuesContainer.get(OFFSET_navigation);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user