mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
common: generalize json_tok_remove.
It assumes the head of the array is the object/array we want to remove from, but that's not true if we're trying to remove from a sub-object. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1193,7 +1193,7 @@ static struct command_result *json_check(struct command *cmd,
|
||||
if (params->type == JSMN_OBJECT)
|
||||
name_tok--;
|
||||
|
||||
json_tok_remove(&mod_params, (jsmntok_t *)name_tok, 1);
|
||||
json_tok_remove(&mod_params, mod_params, name_tok, 1);
|
||||
|
||||
cmd->mode = CMD_CHECK;
|
||||
failed = false;
|
||||
|
||||
Reference in New Issue
Block a user