From 01c5e453f805b688e06e6ddef806899ff2b769d7 Mon Sep 17 00:00:00 2001 From: Edoardo Vacchi Date: Wed, 19 Feb 2025 17:46:36 +0100 Subject: [PATCH] feat: zig, support `required` fields (make the others optional) align the schema code example for Zig for optional fields Signed-off-by: Edoardo Vacchi --- schema.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.yaml b/schema.yaml index c6054ca..8ef3e8e 100644 --- a/schema.yaml +++ b/schema.yaml @@ -255,7 +255,7 @@ exports: var arr = std.ArrayList(u8).init(std.heap.wasm_allocator); try arr.insertSlice(0, new); - try arr.insertSlice(new.len, input.aBuffer[old.len..]); + try arr.insertSlice(new.len, input.aBuffer.?[old.len..]); output.aBuffer = try arr.toOwnedSlice(); return output; - lang: c++