mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-06 01:55:53 +01:00
fix: support encode styled string if length larger than offset (#3254)
This commit is contained in:
parent
50226e50c1
commit
22d792e328
@ -157,8 +157,11 @@ public class StyledString {
|
||||
}
|
||||
|
||||
// write encoded raw text preceding the closing tag
|
||||
if (spanEnd > lastOffset) {
|
||||
if (spanEnd > lastOffset && text.length() >= spanEnd) {
|
||||
xmlValue.append(ResXmlEncoders.escapeXmlChars(text.substring(lastOffset, spanEnd)));
|
||||
} else if (text.length() >= lastOffset && text.length() < spanEnd) {
|
||||
LOGGER.warning("Span (" + name + ") exceeds text length " + text.length());
|
||||
xmlValue.append(ResXmlEncoders.escapeXmlChars(text.substring(lastOffset)));
|
||||
}
|
||||
lastOffset = spanEnd;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user