tape: Fix DecodeAny method not converting values properly

This commit is contained in:
Sasha Koshka 2025-10-12 18:09:55 -04:00
parent 7a03d8d6b5
commit 2e03867c66

View File

@ -116,9 +116,9 @@ func DecodeAnyInto(decoder *Decoder, destination any, tag Tag) (n int, err error
func DecodeAny(decoder *Decoder, tag Tag) (value any, n int, err error) {
destination, err := skeletonPointer(decoder, tag)
if err != nil { return nil, n, err }
nn, err := DecodeAnyInto(decoder, destination, tag)
nn, err := decodeAny(decoder, destination, tag)
n += nn; if err != nil { return nil, n, err }
return destination, n, err
return destination.Elem().Interface(), n, err
}
// unknownSlicePlaceholder is inserted by skeletonValue and informs the program