From d819281fe4afcc796c4ff05209a43a6f87646e47 Mon Sep 17 00:00:00 2001 From: MrBounty Date: Thu, 30 Jan 2025 20:11:51 +0100 Subject: [PATCH] Fix If the array is empty, I still ne to append 8 bytes to hold the array len --- src/file/array.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/array.zig b/src/file/array.zig index c91aa08..11faace 100644 --- a/src/file/array.zig +++ b/src/file/array.zig @@ -8,7 +8,6 @@ const ArrayCondition = @import("../ziql/parts//newData.zig").ArrayCondition; /// Update an array based on keyword like append or remove pub fn updateData(allocator: std.mem.Allocator, condition: ArrayCondition, input: *zid.Data, data: ?ConditionValue) !void { - std.debug.print("HERE {any}\n", .{condition}); try switch (condition) { .append => append(allocator, input, data.?), .pop => pop(allocator, input), @@ -50,6 +49,7 @@ fn pop(allocator: std.mem.Allocator, input: *zid.Data) !void { }, else => unreachable, } else { + try updated_array.appendNTimes(' ', 8); new_len = 0; }