Skip to content

Commit

Permalink
json_param: accept JSMN_PRIMITIVE as escaped_string
Browse files Browse the repository at this point in the history
  • Loading branch information
m-schmoock committed Feb 10, 2023
1 parent 12c5bc1 commit 1dd29ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/json_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ struct command_result *param_escaped_string(struct command *cmd,
const jsmntok_t *tok,
const char **str)
{
if (tok->type == JSMN_STRING) {
if (tok->type == JSMN_STRING || tok->type == JSMN_PRIMITIVE) {
struct json_escape *esc;
/* jsmn always gives us ~ well-formed strings. */
esc = json_escape_string_(cmd, buffer + tok->start,
Expand Down

0 comments on commit 1dd29ea

Please sign in to comment.