Skip to content

Commit

Permalink
bug fix: hashToCmd useLexOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
HDT3213 committed Apr 27, 2023
1 parent d84437d commit d64b5f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cases/memory.aof
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ HMSET
$4
hash
$16
mddbhxnzsbklyp8c
$16
mddbhxnzsbklyp8c
$16
ca32mbn2k3tp41iu
$16
ca32mbn2k3tp41iu
$16
mddbhxnzsbklyp8c
$16
mddbhxnzsbklyp8c
*3
$3
SET
Expand Down
2 changes: 1 addition & 1 deletion helper/resp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit d64b5f2

Please sign in to comment.