mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
runes: fix weird unnecessary zero-test.
This seems to be a cut & paste bug (mine, AFAICT!) from the command code: ``` rune = rune_derive_start(cmd, master_rune, tal_fmt(tmpctx, "%"PRIu64, rune_counter ? *rune_counter : 0)); ``` In that case, rune_counter was a pointer, which could be NULL. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
785fe973a6
commit
2765939adb
@ -569,7 +569,8 @@ static struct command_result *json_createrune(struct command *cmd,
|
||||
|
||||
ras = tal(cmd, struct rune_and_string);
|
||||
ras->rune = rune_derive_start(cmd, cmd->ld->runes->master,
|
||||
tal_fmt(tmpctx, "%"PRIu64, cmd->ld->runes->next_unique_id ? cmd->ld->runes->next_unique_id : 0));
|
||||
tal_fmt(tmpctx, "%"PRIu64,
|
||||
cmd->ld->runes->next_unique_id));
|
||||
ras->runestr = rune_to_base64(tmpctx, ras->rune);
|
||||
|
||||
for (size_t i = 0; i < tal_count(restrs); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user