Skip to content

Commit

Permalink
Fix null ptr in char array
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Apr 2, 2024
1 parent 9f83ec7 commit 165d4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ private void wrapStringToWidthICU4J(String str, int wrapWidth, CallbackInfoRetur
prevFormat = format.length();
lineWidth = getCharWidth(current);
} else {
if (chars[icui] == '§') {
if (isFormatSpecial(chars[icui + 1]) || isFormatColor(chars[icui + 1])) {
if (chars[icui - 1] == '§') {
if (isFormatSpecial(chars[icui]) || isFormatColor(chars[icui])) {
icui++;
}
}
Expand Down

0 comments on commit 165d4c7

Please sign in to comment.