From b965ee00d55b1ca37f05f564c3ec45656d980d61 Mon Sep 17 00:00:00 2001 From: hdt3213 Date: Sun, 17 Sep 2023 15:39:59 +0800 Subject: [PATCH] fix a listpack decode bug --- core/listpack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/listpack.go b/core/listpack.go index 18e2de6..cddd591 100644 --- a/core/listpack.go +++ b/core/listpack.go @@ -108,7 +108,7 @@ func (dec *Decoder) readListPackEntry(buf []byte, cursor *int) ([]byte, uint32, if err != nil { return nil, 0, err } - strLen := int(binary.BigEndian.Uint32(lenBytes)) + strLen := int(binary.LittleEndian.Uint32(lenBytes)) result, err := readBytes(buf, cursor, strLen) if err != nil { return nil, 0, err