Unverified Commit bb666d44 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #5027 from tigertv/unstable

Update sort.c
parents b9058c73 d4c4f20a
...@@ -447,7 +447,7 @@ void sortCommand(client *c) { ...@@ -447,7 +447,7 @@ void sortCommand(client *c) {
serverAssertWithInfo(c,sortval,j == vectorlen); serverAssertWithInfo(c,sortval,j == vectorlen);
/* Now it's time to load the right scores in the sorting vector */ /* Now it's time to load the right scores in the sorting vector */
if (dontsort == 0) { if (!dontsort) {
for (j = 0; j < vectorlen; j++) { for (j = 0; j < vectorlen; j++) {
robj *byval; robj *byval;
if (sortby) { if (sortby) {
...@@ -487,9 +487,7 @@ void sortCommand(client *c) { ...@@ -487,9 +487,7 @@ void sortCommand(client *c) {
decrRefCount(byval); decrRefCount(byval);
} }
} }
}
if (dontsort == 0) {
server.sort_desc = desc; server.sort_desc = desc;
server.sort_alpha = alpha; server.sort_alpha = alpha;
server.sort_bypattern = sortby ? 1 : 0; server.sort_bypattern = sortby ? 1 : 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment