修复 bool类型解析错误
This commit is contained in:
parent
d043ea1d29
commit
56b488a776
|
@ -295,7 +295,7 @@ void *csonDecodeObject(cJSON *json, CsonModel *model, int modelSize)
|
||||||
*(double *)((int)obj + model[i].offset) = csonDecodeDouble(json, model[i].key);
|
*(double *)((int)obj + model[i].offset) = csonDecodeDouble(json, model[i].key);
|
||||||
break;
|
break;
|
||||||
case CSON_TYPE_BOOL:
|
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;
|
break;
|
||||||
case CSON_TYPE_STRING:
|
case CSON_TYPE_STRING:
|
||||||
*(int *)((int)obj + model[i].offset) = (int)csonDecodeString(json, model[i].key);
|
*(int *)((int)obj + model[i].offset) = (int)csonDecodeString(json, model[i].key);
|
||||||
|
|
Loading…
Reference in New Issue