encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal
This commit is contained in:
1 parent
1e3a924e11
commit
4608d26e6e
2 files changed
+6
-1
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user