nbt chat message
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
Go / Test (1.22) (push) Has been cancelled
Go / Test (^1.22) (push) Has been cancelled

This commit is contained in:
2025-08-26 23:47:10 +08:00
parent 540ba15e83
commit acb1555ede
3 changed files with 7 additions and 3 deletions

View File

@ -387,7 +387,7 @@ func (d *Decoder) unmarshal(val reflect.Value, tagType byte) error {
// Fall back to linear search.
for i := range fields.list {
ff := &fields.list[i]
if strings.EqualFold(ff.name, tn) {
if strings.EqualFold(ff.name, tn) || ff.asDefault && tn == "" {
f = ff
break
}