summaryrefslogtreecommitdiff
path: root/src/t_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/t_string.c')
-rw-r--r--src/t_string.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/t_string.c b/src/t_string.c
index 6b30c9751..fb53f7c54 100644
--- a/src/t_string.c
+++ b/src/t_string.c
@@ -602,8 +602,11 @@ void lcsCommand(client *c) {
/* Start with a deferred array if we have to emit the ranges. */
uint32_t arraylen = 0; /* Number of ranges emitted in the array. */
- if (getidx && idxkey == NULL)
+ if (getidx && idxkey == NULL) {
+ addReplyMapLen(c,2);
+ addReplyBulkCString(c,"matches");
arraylenptr = addReplyDeferredLen(c);
+ }
i = alen, j = blen;
while (computelcs && i > 0 && j > 0) {
@@ -669,6 +672,8 @@ void lcsCommand(client *c) {
/* Reply depending on the given options. */
if (arraylenptr) {
+ addReplyBulkCString(c,"len");
+ addReplyLongLong(c,LCS(alen,blen));
setDeferredArrayLen(c,arraylenptr,arraylen);
} else if (getlen) {
addReplyLongLong(c,LCS(alen,blen));