mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 01:07:34 +01:00
ResXmlEncoders::findNonPositionalSubstitutions() : fixed a bug when string ends with percentage char.
This commit is contained in:
parent
c74b2ab04f
commit
269870bad6
@ -160,8 +160,12 @@ public final class ResXmlEncoders {
|
||||
int max) {
|
||||
int pos = 0;
|
||||
int count = 0;
|
||||
int length = str.length();
|
||||
List<Integer> ret = new ArrayList<Integer>();
|
||||
while((pos = str.indexOf('%', pos)) != -1) {
|
||||
if (pos + 1 == length) {
|
||||
break;
|
||||
}
|
||||
if (str.charAt(pos + 1) != '%') {
|
||||
ret.add(pos);
|
||||
if (max != -1 && ++count >= max) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user