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>
This commit is contained in:
Dirk Hohndel 2013-12-06 09:30:39 -08:00
parent 5506fa4b38
commit 8f58faf431

View file

@ -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++) {