From b5690f00e2e27a3336eb06e77f4331e5e05a05d6 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 15 Mar 2009 16:39:41 -0400 Subject: [PATCH] Portabiliy - Fedora 9, Ubuntu 8 - The custom report limit "report.x.limit" was being used to limit the rendered rows in the table. Instead, there should be something like min (limit, actual_rows) used, in Table.cpp. The symptom was duplicate tasks in a "task oldest" report, when there were less than 10 tasks. --- src/Table.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Table.cpp b/src/Table.cpp index 8052ca0b3..6f20c1b50 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -1032,7 +1032,7 @@ const std::string Table::render (int maximum /* = 0 */) // the table that are rendered. int limit = mRows; if (maximum != 0) - limit = maximum; + limit = min (maximum, mRows); // Print all rows. for (int row = 0; row < limit; ++row)