mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-06 10:05:54 +01:00
don't write a trailing /u0000 if its the last char of the string
This commit is contained in:
parent
541301278b
commit
c5a8f0c8a5
@ -121,6 +121,11 @@ public final class ResXmlEncoders {
|
||||
break;
|
||||
default:
|
||||
if (!isPrintableChar(c)) {
|
||||
|
||||
// lets not write trailing \u0000 if we are at end of string
|
||||
if ((out.length() + 1) == str.length() && c == '\u0000') {
|
||||
continue;
|
||||
}
|
||||
out.append(String.format("\\u%04x", (int) c));
|
||||
continue;
|
||||
}
|
||||
@ -132,7 +137,6 @@ public final class ResXmlEncoders {
|
||||
if (enclose || wasSpace) {
|
||||
out.insert(startPos, '"').append('"');
|
||||
}
|
||||
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user