Fixed possible division by zero when justified text is enabled. Closes #682

This commit is contained in:
Lizbeth Rika committed 2015-03-24 21:27:24 +00:00
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) {