X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/760e7765263ff4b6d5176830c9e8e8d733744996..021d16b6430b39f7709a70466007df1ca16867e5:/src/t_string.c?ds=inline diff --git a/src/t_string.c b/src/t_string.c index 1e29a613..ba427961 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -26,7 +26,7 @@ void setGenericCommand(redisClient *c, int nx, robj *key, robj *val, robj *expir if (unit == UNIT_SECONDS) milliseconds *= 1000; } - if (lookupKeyWrite(c->db,key) != NULL && nx) { + if (nx && lookupKeyWrite(c->db,key) != NULL) { addReply(c,shared.czero); return; }