From 56b488a7761ab558cc84c5dfc0433c988d71119f Mon Sep 17 00:00:00 2001 From: Letter Date: Sun, 17 Oct 2021 13:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20bool=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cson.c b/src/cson.c index de0b168..6fee6bb 100644 --- a/src/cson.c +++ b/src/cson.c @@ -295,7 +295,7 @@ void *csonDecodeObject(cJSON *json, CsonModel *model, int modelSize) *(double *)((int)obj + model[i].offset) = csonDecodeDouble(json, model[i].key); break; case CSON_TYPE_BOOL: - *(char *)((int)obj + model[i].offset) = (char)csonDecodeNumber(json, model[i].key); + *(char *)((int)obj + model[i].offset) = (char)csonDecodeBool(json, model[i].key); break; case CSON_TYPE_STRING: *(int *)((int)obj + model[i].offset) = (int)csonDecodeString(json, model[i].key);