From 3041792dac55f2bd76ad2d8ea63aa8f91ac74ac9 Mon Sep 17 00:00:00 2001 From: Tnze Date: Sun, 5 Jan 2020 01:40:14 +0800 Subject: [PATCH] nbt: fix TagLongArray error message --- nbt/read.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbt/read.go b/nbt/read.go index 7c9bdda..251d83c 100644 --- a/nbt/read.go +++ b/nbt/read.go @@ -229,9 +229,9 @@ func (d *Decoder) unmarshal(val reflect.Value, tagType byte, tagName string) err if vt.Kind() == reflect.Interface { vt = reflect.TypeOf([]int64{}) // pass } else if vt.Kind() != reflect.Slice { - return errors.New("cannot parse TagIntArray to " + vt.String() + ", it must be a slice") + return errors.New("cannot parse TagLongArray to " + vt.String() + ", it must be a slice") } else if val.Type().Elem().Kind() != reflect.Int64 { - return errors.New("cannot parse TagIntArray to " + vt.String()) + return errors.New("cannot parse TagLongArray to " + vt.String()) } buf := reflect.MakeSlice(vt, int(aryLen), int(aryLen))