diff options
| author | dam <dam@gudinoff> | 2023-04-15 17:27:01 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2023-04-15 17:27:01 +0100 |
| commit | 2a893df3b65bfd01e666c0df0498dba1694ebebe (patch) | |
| tree | 03052291ca08550d3cc0110b2bda43f69f2144f5 | |
| parent | 03616634e7b034891725864fe88e68b7e760b8a2 (diff) | |
| download | task-time-tracker-2a893df3b65bfd01e666c0df0498dba1694ebebe.tar.zst task-time-tracker-2a893df3b65bfd01e666c0df0498dba1694ebebe.zip | |
Fix reset_database.
| -rw-r--r-- | ttt.jai | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -530,8 +530,8 @@ void add_task_time(database_st *db, task_st *task, int day, int64_t time) { // Resets database to the initial state and deallocates all memory taken by tasks. reset_database :: (db: *Database) { - assert(db != null); - free(db.tasks.data); + assert(db != null, "Parameter 'db' is null."); + array_reset(*db.tasks); <<db = .{}; } |
