cli: remove formatting hint correclty when it's not the last element.

I noticed that the 'lightning-cli summary' output was wrong.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-08-13 13:30:22 +09:30
parent 69b02e287a
commit 0f5036d866
2 changed files with 115 additions and 1 deletions

View File

@@ -408,7 +408,7 @@ static enum format delete_format_hint(const char *resp,
format = HUMAN;
/* Don't let hint appear in the output! */
json_tok_remove(toks, result, hint, 1);
json_tok_remove(toks, result, hint-1, 1);
return format;
}