From 625b44ca131d4b74c73ffb32aef19c35aa08cb09 Mon Sep 17 00:00:00 2001 From: dam Date: Mon, 14 Nov 2022 22:54:40 +0000 Subject: Fixed bug on import_from_csv. --- main.c | 2 +- readme.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 3f78476..10d3c62 100644 --- a/main.c +++ b/main.c @@ -647,7 +647,7 @@ bool import_from_csv(database_st *db, const char *path) { if (name_delimiter == NULL) { continue; } - size_t name_length = (name_delimiter - csv_buffer) + 1; + size_t name_length = (name_delimiter - csv_buffer); if (name_length > TASK_NAME_LENGTH) { name_length = TASK_NAME_LENGTH; } diff --git a/readme.md b/readme.md index 2e28b48..b241a57 100644 --- a/readme.md +++ b/readme.md @@ -60,13 +60,13 @@ Task Time Tracker - [x] Replaced `sprintf` by `snprintf`; - [x] Make sure that string_buffer bounds are respected; - [x] Rename `MAX_TASK_NAME` to something more informative; -- [ ] Compress code: +- [x] Compress code: - [x] Re-do sprint_time5_utf8: -12 delta LOC; - [x] Re-do truncate_string_utf8: 0 delta LOC; - [x] Implement `read_input_to_string_buffer`: -24 delta LOC; - [x] Wrap malloc (and maybe others) in a function with error checking; - [x] Move database actions into functions; -- [ ] Fix bug: archiving/unarchiving task introduces " ," at end of name and increases the number of spaces before comma; +- [x] Fix bug: archiving/unarchiving task introduces " ," at end of name and increases the number of spaces before comma; - [ ] Check if draw_tui may be simplified by drawing entire lines of tasks at once and draw columns separators after; - [ ] Review all code for bugs related to auto-cast on ptrdiff_t/size_t (signed/unsigned); - [ ] Try to fix flickering of ncurses; -- cgit v1.2.3