From: Janis Streib Date: Fri, 27 Jun 2014 09:27:55 +0000 (+0200) Subject: Another calc fix X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=6c6afe1d08ed41db46382a950173c5e403404048 Another calc fix --- diff --git a/src/org/cacert/gigi/output/DataTable.java b/src/org/cacert/gigi/output/DataTable.java index fb4f4da6..e17714c8 100644 --- a/src/org/cacert/gigi/output/DataTable.java +++ b/src/org/cacert/gigi/output/DataTable.java @@ -16,7 +16,7 @@ public class DataTable implements Outputable { } public void output(PrintWriter out, Language l) { - int mesCells = cells.size(); + float mesCells = cells.size(); for (Cell c : cells) { if (c.getColSpan() > 1) { mesCells += c.getColSpan(); @@ -24,7 +24,7 @@ public class DataTable implements Outputable { } out.println(""); int cellsRendered = 0; - for (int i = 0; i < (mesCells / columnCount) - 1; i++) { + for (int i = 0; i < Math.ceil(mesCells / columnCount) - 1; i++) { out.println(""); for (int j = 0; j < columnCount;) { Cell current = cells.get(cellsRendered++);