From 463def2c3c590873706e0073e7101d6bc1ef89f1 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Wed, 12 Jan 2022 19:23:13 +0100 Subject: [PATCH] json: fix wrong func --- application/json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/json.c b/application/json.c index 5a5446e..ea167e5 100644 --- a/application/json.c +++ b/application/json.c @@ -615,9 +615,9 @@ int json_reader_isnull(JSONParser *p) { JSONLiteralType json_reader_literal(JSONParser *p) { const char *l = p->reader_token.content; size_t token_len = p->reader_token.length; - if(token_len == 4 && !memcpy(l, "true", 5)) { + if(token_len == 4 && !memcmp(l, "true", 5)) { return JSON_TRUE; - } else if(token_len == 5 && !memcpy(l, "false", 5)) { + } else if(token_len == 5 && !memcmp(l, "false", 5)) { return JSON_FALSE; } return JSON_NULL; -- 1.8.3.1