]> git.saurik.com Git - redis.git/blobdiff - redis.c
Fixed crash with only space and newline as command (issue 61), thanks to a guy having...
[redis.git] / redis.c
diff --git a/redis.c b/redis.c
index 7d3bc5642ba8ef1bd8aca5a4e9d59a87d7301d92..607c827a4cb63d48ff1b342ef7949d6db60d4486 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -1488,7 +1488,7 @@ again:
             /* Execute the command. If the client is still valid
              * after processCommand() return and there is something
              * on the query buffer try to process the next command. */
-            if (processCommand(c) && sdslen(c->querybuf)) goto again;
+            if (c->argc && processCommand(c) && sdslen(c->querybuf)) goto again;
             return;
         } else if (sdslen(c->querybuf) >= REDIS_REQUEST_MAX_SIZE) {
             redisLog(REDIS_DEBUG, "Client protocol error");