diff --git a/cases/memory.aof b/cases/memory.aof index e422d6d..9761cb1 100644 --- a/cases/memory.aof +++ b/cases/memory.aof @@ -4,13 +4,13 @@ HMSET $4 hash $16 -mddbhxnzsbklyp8c -$16 -mddbhxnzsbklyp8c -$16 ca32mbn2k3tp41iu $16 ca32mbn2k3tp41iu +$16 +mddbhxnzsbklyp8c +$16 +mddbhxnzsbklyp8c *3 $3 SET diff --git a/helper/resp.go b/helper/resp.go index 57fa303..8f1da73 100644 --- a/helper/resp.go +++ b/helper/resp.go @@ -79,7 +79,7 @@ func hashToCmd(obj *model.HashObject, useLexOrder bool) CmdLine { }) } sort.Slice(entries, func(i, j int) bool { - return string(entries[i][0]) < string(entries[i][1]) + return string(entries[i][0]) < string(entries[j][0]) }) for _, entry := range entries { cmdLine[2+i*2] = entry[0]