From 02ddcc0c78e7537cf4cabb4fc593771f901b01db Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Wed, 25 Sep 2019 17:28:42 +0100 Subject: [PATCH] [fix] fixed the un-refactor bug. --- src/module.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/module.c b/src/module.c index 067a69928..d02e2708c 100644 --- a/src/module.c +++ b/src/module.c @@ -1126,9 +1126,10 @@ int RM_ReplyWithLongLong(RedisModuleCtx *ctx, long long ll) { int replyWithStatus(RedisModuleCtx *ctx, const char *msg, char *prefix) { client *c = moduleGetReplyClient(ctx); if (c == NULL) return REDISMODULE_OK; - const size_t len = strlen(msg); - addReplyProto(c,"-",1); - addReplyProto(c,msg,len); + const size_t msgLen = strlen(msg); + const size_t prefixLen = strlen(prefix); + addReplyProto(c,prefix,prefixLen); + addReplyProto(c,msg,msgLen); addReplyProto(c,"\r\n",2); return REDISMODULE_OK; }