From 1895e134a77efd789b1a6daee76a6ba5ec90e516 Mon Sep 17 00:00:00 2001 From: Huang Zhw Date: Mon, 19 Jul 2021 16:10:25 +0800 Subject: [PATCH] Fix missing separator in module info line (usedby and using lists) (#9241) Fix module info genModulesInfoStringRenderModulesList lack separator when there's more than one module in the list. Co-authored-by: Oran Agra --- src/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module.c b/src/module.c index 29340a1de..15d8d7d0d 100644 --- a/src/module.c +++ b/src/module.c @@ -8832,8 +8832,9 @@ sds genModulesInfoStringRenderModulesList(list *l) { while((ln = listNext(&li))) { RedisModule *module = ln->value; output = sdscat(output,module->name); + if (ln != listLast(l)) + output = sdscat(output,"|"); } - output = sdstrim(output,"|"); output = sdscat(output,"]"); return output; }