From: Olaf Wintermann Date: Wed, 12 Jan 2022 18:23:13 +0000 (+0100) Subject: json: fix wrong func X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=463def2c3c590873706e0073e7101d6bc1ef89f1;p=uwplayer.git json: fix wrong func --- 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;