Commit 1ee18db9 authored by antirez's avatar antirez
Browse files

Fixed error message generation in PFDEBUG GETREG.

Bulk length for registers was emitted too early, so if there was a bug
the reply looked like a long array with just one element, blocking the
client as result.
parent 82c31f75
......@@ -1246,12 +1246,13 @@ void pfdebugCommand(redisClient *c) {
if (!strcasecmp(cmd,"getreg")) {
if (c->argc != 3) goto arityerr;
addReplyMultiBulkLen(c,HLL_REGISTERS);
if (hllSparseToDense(o) == REDIS_ERR) {
addReplyError(c,"HLL sparse encoding is corrupted");
return;
}
hdr = o->ptr;
addReplyMultiBulkLen(c,HLL_REGISTERS);
for (j = 0; j < HLL_REGISTERS; j++) {
uint8_t val;
......
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