fix last char missing lol

This commit is contained in:
Christopher Bohn 2024-02-26 03:24:32 -08:00
parent 6221323e98
commit 8e86226123
1 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,7 @@ public final class AdventureUtil {
* Normalizes formatting codes within a section sign legacy string
*/
private static String normalizeLegacyText(String text) {
if (text == null) {
if (text == null || text.isEmpty()) {
return null;
}
final int length = text.length();
@ -113,6 +113,7 @@ public final class AdventureUtil {
++i;
}
}
normalized.append(chars[length - 1]);
return normalized.toString();
}