encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal

This commit is contained in:
Laytan Laats
2024-10-26 22:39:46 +02:00
parent 1e3a924e11
commit 4608d26e6e
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -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
}
}