From 69af02c3e5f8f9e68e383225747bee8d97ef03b2 Mon Sep 17 00:00:00 2001 From: Nicolas Mora Date: Wed, 28 Feb 2024 11:21:28 -0500 Subject: [PATCH] Fix h_get_where_clause_from_json_object on boolean causes --- src/hoel-simple-json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hoel-simple-json.c b/src/hoel-simple-json.c index 911bbd0..88615ec 100644 --- a/src/hoel-simple-json.c +++ b/src/hoel-simple-json.c @@ -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");