aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2023-03-30 00:36:31 +0100
committerdam <dam@gudinoff>2023-03-30 00:36:31 +0100
commita7d4d3038a11fd8b6f8a1439840c2034ebb3ae01 (patch)
tree5f0fd2aaa34ec7fc166aad1fcedccc916b4c99c3 /ttt.jai
parent2e42845bda874cddfb1e0feed8448cad91dd0a24 (diff)
downloadtask-time-tracker-a7d4d3038a11fd8b6f8a1439840c2034ebb3ae01.tar.zst
task-time-tracker-a7d4d3038a11fd8b6f8a1439840c2034ebb3ae01.zip
Fixed bug loading database.
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai5
1 files changed, 5 insertions, 0 deletions
diff --git a/ttt.jai b/ttt.jai
index 1d7edfb..4c79f86 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -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");