summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulino Huerta <paulinohuerta@gmail.com>2016-05-14 01:53:48 +0200
committerPaulino Huerta <paulinohuerta@gmail.com>2016-05-14 01:53:48 +0200
commit360a0646bb0f7373caab08382772ca0384c1fe6d (patch)
tree1c9032c9748b38830a4759c73d1ccc8560542c66
parente93c05a7aa64736c91e455322c83181e8e67cd0e (diff)
Typo format in redisFormatSdsCommandArgv function
this issue is very significant, because not allow the proper execution of the "function redisCommandArgv". The server returns "invalid bulk length". Thanks!
-rw-r--r--hiredis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hiredis.c b/hiredis.c
index 2b876d9..18bdfc9 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -507,7 +507,7 @@ int redisFormatSdsCommandArgv(sds *target, int argc, const char **argv,
cmd = sdscatfmt(cmd, "*%i\r\n", argc);
for (j=0; j < argc; j++) {
len = argvlen ? argvlen[j] : strlen(argv[j]);
- cmd = sdscatfmt(cmd, "$%T\r\n", len);
+ cmd = sdscatfmt(cmd, "$%u\r\n", len);
cmd = sdscatlen(cmd, argv[j], len);
cmd = sdscatlen(cmd, "\r\n", sizeof("\r\n")-1);
}