mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 09:40:19 +01:00
plugins/offers: fix crash when we report unpaid prev invoice.
And add annotation so compiler spots it! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
2aa833d424
commit
6aaecbc7b3
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ fail_invreq_level(struct command *cmd,
|
||||||
"invoice_error", errdata);
|
"invoice_error", errdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct command_result *WARN_UNUSED_RESULT
|
static struct command_result *WARN_UNUSED_RESULT PRINTF_FMT(3,4)
|
||||||
fail_invreq(struct command *cmd,
|
fail_invreq(struct command *cmd,
|
||||||
const struct invreq *invreq,
|
const struct invreq *invreq,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
|
@ -361,7 +361,7 @@ static struct command_result *prev_invoice_done(struct command *cmd,
|
||||||
status = json_get_member(buf, arr + 1, "status");
|
status = json_get_member(buf, arr + 1, "status");
|
||||||
if (!json_tok_streq(buf, status, "paid")) {
|
if (!json_tok_streq(buf, status, "paid")) {
|
||||||
return fail_invreq(cmd, ir,
|
return fail_invreq(cmd, ir,
|
||||||
"Previous invoice #%u status *.%s",
|
"Previous invoice #%u status %.*s",
|
||||||
*ir->inv->recurrence_counter - 1,
|
*ir->inv->recurrence_counter - 1,
|
||||||
json_tok_full_len(status),
|
json_tok_full_len(status),
|
||||||
json_tok_full(buf, status));
|
json_tok_full(buf, status));
|
||||||
|
|
Loading…
Add table
Reference in a new issue