diff options
| author | dam <dam@gudinoff> | 2022-09-28 21:37:03 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2022-09-28 21:37:03 +0000 |
| commit | 47c212995981145cdf620144c8ce8de7b1e5d634 (patch) | |
| tree | ef79cbc62070a7c2b16ef4210e6263e44ba9e307 | |
| parent | a6f2aba9a42b4c439721668dd37f88f0e7c0b8fc (diff) | |
| download | task-time-tracker-47c212995981145cdf620144c8ce8de7b1e5d634.tar.zst task-time-tracker-47c212995981145cdf620144c8ce8de7b1e5d634.zip | |
Made sure that we are not using strcat and strcpy functions.
| -rw-r--r-- | main.c | 5 | ||||
| -rw-r--r-- | readme.md | 2 |
2 files changed, 2 insertions, 5 deletions
@@ -1068,11 +1068,8 @@ int main(int argc, char *argv[]) { curs_set(1); mvgetnstr(row, 1, string_buffer, MAX_TASK_NAME-1); - string_buffer[MAX_TASK_NAME-1] = '\0'; - truncate_string_utf8(string_buffer, MAX_TASK_NAME-1); - if (is_empty_string(string_buffer) == false) { - strcpy(selected_task->name, string_buffer); + memcpy(selected_task->name, string_buffer, MAX_TASK_NAME); } curs_set(0); @@ -33,7 +33,7 @@ Task Time Tracker - [x] rename layout members: title_header, archive_header, total_header, days_headers, column_widths, column_alignments, headers_paddings. - [x] using the archive header, we can remove the top-left-corner diamond on the archive. - [x] Allow to cancel a rename_task operation: you can do it by leaving it blank. -- [ ] Make sure we are not using `strcat` and `strcpy`... or that we are using them wisely (famous last words). +- [x] Make sure we are not using `strcat` and `strcpy`... or that we are using them wisely (famous last words). - [ ] Make archive be stored in CSV format: takes less space and allows to quickly archive by appending to end of file; - [ ] Implement `append_to_csv(task_t *task, char *path_name)` and use it in archive function; - [ ] MAYBE... IS THIS REALLY NEEDED? add helper func: get_selected_screen_row(db*, out int selected_row); It seems to be used in KEY_F(1) and KEY_F(2) cases of input management. |
