mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 05:02:30 +00:00
Fixed possible division by zero when justified text is enabled. Closes #682
This commit is contained in:
1 parent
eca00841b7
commit
6535359231
1 file changed
+2
-2
@@ -92,8 +92,8 @@ public class PageText extends LexiconPage {
|
||||
int swidth = font.getStringWidth(s);
|
||||
int space = width - swidth;
|
||||
|
||||
spacing = space / (wcount - 1);
|
||||
compensationSpaces = space % (wcount - 1);
|
||||
spacing = wcount == 1 ? 0 : space / (wcount - 1);
|
||||
compensationSpaces = wcount == 1 ? 0 : space % (wcount - 1);
|
||||
}
|
||||
|
||||
for(String s : words) {
|
||||
|
||||
Reference in new issue
Block a user