From 8f58faf43110ec83e991243bbecdb1883c1b126b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 6 Dec 2013 09:30:39 -0800 Subject: Fix crash in table print crash sizeof(array) is the total size in bytes, not the number of elements... Signed-off-by: Dirk Hohndel --- qt-ui/printlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/printlayout.cpp') diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index 199c18b01..43e747ef7 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -341,7 +341,7 @@ void PrintLayout::printTable() int tableHeight = 0, lastAccIndex = 0, rowH, accH, headings; bool isHeading = false; - for (int pass = 0; pass < sizeof(passes); pass++) { + for (int pass = 0; pass < sizeof(passes) / sizeof(passes[0]); pass++) { progress = headings = accH = 0; total = model.rows - lastAccIndex; for (int i = lastAccIndex; i < model.rows; i++) { -- cgit v1.2.3-70-g09d2