X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/46c31a150a0e6a67eaaf4b1e1146ec815cc1355e..7eb850ef0e437323e2d84157ddc2e6e82af57bbc:/src/scripting.c diff --git a/src/scripting.c b/src/scripting.c index b1cbc6ff..35b654f7 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -282,11 +282,10 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) { * reply as expected. */ if ((cmd->flags & REDIS_CMD_SORT_FOR_SCRIPT) && (reply[0] == '*' && reply[1] != '-')) { - /* Skip this step if command is SORT but output was already sorted */ - if (cmd->proc != sortCommand || server.sort_dontsort) luaSortArray(lua); } sdsfree(reply); + c->reply_bytes = 0; cleanup: /* Clean up. Command code may have changed argv/argc so we use the