Skip to content

Commit

Permalink
look for the field name, not for the value
Browse files Browse the repository at this point in the history
  • Loading branch information
gquintard committed Mar 22, 2024
1 parent bd266b8 commit 9ed7881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tok_next(const char **p, struct vsb *vsb)
void
replaceString(cJSON *object, const char *field, const char *value)
{
if (cJSON_GetObjectItemCaseSensitive(object, value)) {
if (cJSON_GetObjectItemCaseSensitive(object, field)) {
cJSON *temp_s = cJSON_CreateString(value);
AN(temp_s);
cJSON_ReplaceItemInObjectCaseSensitive(object, field, temp_s);
Expand Down

0 comments on commit 9ed7881

Please sign in to comment.