diff --git a/src/dodo.c b/src/dodo.c index 2f93cc8..8ab5a4e 100644 --- a/src/dodo.c +++ b/src/dodo.c @@ -124,10 +124,10 @@ int print_fixed_width(const unsigned char* str){ int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, char* status){ - static int max_rows = 0; + static int max_rows = -1; int rc = 0; int i = 0; - int num_rows = 0; + int num_rows = -1; int num_cols = 0; char* errmsg; const unsigned char* col_val; @@ -169,7 +169,9 @@ int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, c // Once the task list is completely printed // reset to the top of the task lists - X_goup(num_rows); + if (num_rows > 0){ + X_goup(num_rows); + } // if it is the last task list move down one past the longest list if ( status == "blocked"){