aboutsummaryrefslogtreecommitdiff
path: root/core/encoding/cbor
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-10-26 22:39:46 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-10-26 22:39:46 +0200
commit4608d26e6e61731912ef2257f6150d9e43ff2cbf (patch)
treebfe9e2fcf7d187b9fc6f8562ee0b44e68c4ba95b /core/encoding/cbor
parent1e3a924e1167226d67abe5d3f48829e3a8c34c7c (diff)
encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal
Diffstat (limited to 'core/encoding/cbor')
-rw-r--r--core/encoding/cbor/unmarshal.odin2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/encoding/cbor/unmarshal.odin b/core/encoding/cbor/unmarshal.odin
index ed8e9cbfc..c39255d9d 100644
--- a/core/encoding/cbor/unmarshal.odin
+++ b/core/encoding/cbor/unmarshal.odin
@@ -664,6 +664,8 @@ _unmarshal_map :: proc(d: Decoder, v: any, ti: ^reflect.Type_Info, hdr: Header,
// Skips unused map entries.
if use_field_idx < 0 {
+ val := err_conv(_decode_from_decoder(d, allocator=context.temp_allocator)) or_return
+ destroy(val, context.temp_allocator)
continue
}
}