X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/b16e423430465013c14af1550f29e7c25c3a433c..973cb21a0152642ec904cf8f8ab238a31e6ebaa9:/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; }