Skip to content

Commit

Permalink
Fix h_get_where_clause_from_json_object on boolean causes
Browse files Browse the repository at this point in the history
  • Loading branch information
babelouest committed Feb 28, 2024
1 parent 26dffd4 commit 69af02c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hoel-simple-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ static char * h_get_where_clause_from_json_object(const struct _h_connection * c
} else if (json_is_real(value)) {
clause = msprintf("%s='%f'", key, json_real_value(value));
} else if (json_is_true(value)) {
clause = msprintf("%s=1");
clause = msprintf("%s=1", key);
} else if (json_is_false(value)) {
clause = msprintf("%s=0");
clause = msprintf("%s=0", key);
}
if (clause == NULL) {
y_log_message(Y_LOG_LEVEL_ERROR, "Hoel - Error allocating memory for clause");
Expand Down

0 comments on commit 69af02c

Please # to comment.