Commit b23c8bab authored by Itamar Haber's avatar Itamar Haber
Browse files

Uses an offset in addReplyHelp

parent 8b511219
......@@ -604,19 +604,17 @@ void addReplyHelp(client *c, const char **help) {
sds cmd = sdsnew((char*) c->argv[0]->ptr);
void *blenp = addDeferredMultiBulkLength(c);
int blen = 0;
int hlen = 0;
sdstoupper(cmd);
addReplyStatusFormat(c,
"%s <subcommand> arg arg ... arg. Subcommands are:",cmd);
blen++;
sdsfree(cmd);
while (help[hlen]) {
addReplyStatus(c,help[hlen++]);
blen++;
while (help[blen]) {
addReplyStatus(c,help[blen++]);
}
blen += 1; /* Account for the header line(s). */
setDeferredMultiBulkLength(c,blenp,blen);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment