diff options
Diffstat (limited to 'models/helper.go')
-rw-r--r-- | models/helper.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/helper.go b/models/helper.go index c499b5512d..710c15a978 100644 --- a/models/helper.go +++ b/models/helper.go @@ -51,7 +51,7 @@ func JSONUnmarshalHandleDoubleEncode(bs []byte, v interface{}) error { rs = append(rs, temp...) } if ok { - if rs[0] == 0xff && rs[1] == 0xfe { + if len(rs) > 1 && rs[0] == 0xff && rs[1] == 0xfe { rs = rs[2:] } err = json.Unmarshal(rs, v) |