diff options
| author | dam <dam@gudinoff> | 2023-03-30 00:36:31 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2023-03-30 00:36:31 +0100 |
| commit | a7d4d3038a11fd8b6f8a1439840c2034ebb3ae01 (patch) | |
| tree | 5f0fd2aaa34ec7fc166aad1fcedccc916b4c99c3 | |
| parent | 2e42845bda874cddfb1e0feed8448cad91dd0a24 (diff) | |
| download | task-time-tracker-a7d4d3038a11fd8b6f8a1439840c2034ebb3ae01.tar.zst task-time-tracker-a7d4d3038a11fd8b6f8a1439840c2034ebb3ae01.zip | |
Fixed bug loading database.
| -rw-r--r-- | ttt.jai | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -753,9 +753,14 @@ load_database :: (db: *Database, path: string) -> success: bool { db.tasks.data = alloc(db.tasks.count * size_of(Task)); db.capacity = db.tasks.count; + // Read database tasks. + file_read(file, db.tasks.data, size_of(Task) * db.tasks.count); // TODO WIP WIP WIP Does this generate stable memory or temporary? + // Make sure we are reading all the file. + // TODO Clean this. WIP WIP WIP buffer: [1] u8; success, bytes := file_read(file, *buffer, 1); + print("'%'\n", buffer); assert(bytes == 0); print("done importing CSV with a bunch of hacks\n"); |
