Skip to content

Commit

Permalink
Prevent break in format code
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Apr 2, 2024
1 parent 8f82b72 commit b33b743
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ private void wrapStringToWidthICU4J(String str, int wrapWidth, CallbackInfoRetur
lineWidth = getCharWidth(current);
} else {
d = icui - fed;
String first = line.substring(0, d + prevFormat);
if (first.endsWith("§")) WrapFix.logger.info(line);
list.add(first);
if (line.charAt(d + prevFormat) == '§') d--;
list.add(line.substring(0, d + prevFormat));
temp = line.substring(d + prevFormat);
fed = icui;
line.delete(0, line.length()).append(formats[d]).append(temp);
Expand Down

0 comments on commit b33b743

Please sign in to comment.