Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'redis_commands.c')
-rw-r--r--redis_commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis_commands.c b/redis_commands.c
index 7a9812fc..b17c7d59 100644
--- a/redis_commands.c
+++ b/redis_commands.c
@@ -5178,7 +5178,7 @@ redis_copy_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
} ZEND_HASH_FOREACH_END();
}
- REDIS_CMD_INIT_SSTR_STATIC(&cmdstr, 2 + (db > -1) + replace, "COPY");
+ REDIS_CMD_INIT_SSTR_STATIC(&cmdstr, 2 + (db > -1 ? 2 : 0) + replace, "COPY");
redis_cmd_append_sstr(&cmdstr, src, src_len);
redis_cmd_append_sstr(&cmdstr, dst, dst_len);