summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-14 14:33:09 +0100
committerubq323 <ubq323@ubq323.website>2024-04-14 14:33:18 +0100
commitc7cc58468b5a5ff483da7fe8c765ccad199f13f1 (patch)
treeb0b90b48a65c77405138949ffe9ff4031a2542e5 /server
parent670365dc1152101f294e5c2b07fce32e90393345 (diff)
all major features done. program is 90% finished, leaving only the remaining 90%
Diffstat (limited to 'server')
-rw-r--r--server/main.ha2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/main.ha b/server/main.ha
index 19ecc51..31cb6dc 100644
--- a/server/main.ha
+++ b/server/main.ha
@@ -258,6 +258,8 @@ fn floor_div(a: i32, b: i32) i32 = {
fn unload_distant_chunks(state: *server_state) void = {
const n_pics = len(state.pictures);
+ if (n_pics == 0) return;
+
let should_unload = alloc([true...], n_pics);
defer free(should_unload);