diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-06 09:30:39 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-06 09:30:39 -0800 |
commit | 8f58faf43110ec83e991243bbecdb1883c1b126b (patch) | |
tree | 6dbefaf8eed8eb09f157f3466824ae11dfd1d0bf /qt-ui/printlayout.cpp | |
parent | 5506fa4b38a5914e8149b3fd9283d9060df395bb (diff) | |
download | subsurface-8f58faf43110ec83e991243bbecdb1883c1b126b.tar.gz |
Fix crash in table print crash
sizeof(array) is the total size in bytes, not the number of elements...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r-- | qt-ui/printlayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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++) { |