lightning-cli: don't print junk on error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-26 15:25:25 +09:30
parent f662424b7b
commit ca9d775f9a

View File

@@ -132,6 +132,8 @@ int main(int argc, char *argv[])
if (i < 0)
err(ERROR_TALKING_TO_LIGHTNINGD, "reading response");
resp[off] = '\0';
/* Parsing huge results is too slow, so hack fastpath common case */
result_end = tal_fmt(ctx, ", \"error\" : null, \"id\" : \"%s\" }\n",
idstr);