This commit is contained in:
techknowlogick
2020-03-20 10:29:31 -04:00
committed by GitHub
parent e5a008f7b2
commit 2fa1078911
12 changed files with 177 additions and 34 deletions
+2 -2
View File
@@ -201,14 +201,14 @@ func ReadMapHeaderBytes(b []byte) (sz uint32, o []byte, err error) {
// - ErrShortBytes (too few bytes)
// - TypeError{} (not a str or bin)
func ReadMapKeyZC(b []byte) ([]byte, []byte, error) {
o, b, err := ReadStringZC(b)
o, x, err := ReadStringZC(b)
if err != nil {
if tperr, ok := err.(TypeError); ok && tperr.Encoded == BinType {
return ReadBytesZC(b)
}
return nil, b, err
}
return o, b, nil
return o, x, nil
}
// ReadArrayHeaderBytes attempts to read