From bcaf99f8658d28ddb97f9017578ce892c5d43bfd Mon Sep 17 00:00:00 2001 From: dam Date: Tue, 13 Dec 2022 01:03:34 +0000 Subject: Fixed bug introduced on export_csv. Tweaked console output text. --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 769a966..1b7e4da 100644 --- a/main.c +++ b/main.c @@ -650,7 +650,7 @@ bool export_to_csv(const database_st *db, const char *path) { char name[TASK_NAME_BYTES]; for (size_t idx = 0; idx < db->count; idx++) { - task_st *task = db->tasks[idx]; + task_st *task = &db->tasks[idx]; memcpy(name, task->name, TASK_NAME_BYTES); replace_char(name, ',', ' '); fprintf(file, "%s,%" PRId64 ",%" PRId64 ",%" PRId64 ",%" PRId64 ",%" PRId64 ",%" PRId64 ",%" PRId64 "\n", @@ -1202,7 +1202,7 @@ int main(int argc, char *argv[]) { " -h, --help Display this help and exit.\n" " -v, --version Output version information and exit.\n" "\n" - "Commands\n" + "In app commands\n" " a, A Archive selected task (except if active).\n" " u, U Unarchive selected task.\n" " c, C Select currently active task.\n" @@ -1281,7 +1281,7 @@ int main(int argc, char *argv[]) { continue; } - fprintf(stdout, "Unkown option '%s'.\nUse '%s --help' for list of options.\n", argv[idx], argv[0]); + fprintf(stdout, "%s: invalid option '%s'.\nTry '%s --help' for more information.\n", argv[0], argv[idx], argv[0]); return EXIT_FAILURE; } -- cgit v1.2.3