Fix jsonobject.h bug.2

This commit is contained in:
Krad
2022-05-17 16:24:02 +08:00
parent f9825023ad
commit 614aca056e

View File

@@ -81,7 +81,7 @@ void JsonObject::setBool(const char *catergory, const char *stringName, bool val
bool JsonObject::getBool(const char* catergory, const char* stringName) bool JsonObject::getBool(const char* catergory, const char* stringName)
{ {
if (!loadcfg()) if (!loadcfg())
return nullptr; return false;
cJSON* first = cJSON_GetObjectItem((cJSON*)json_root, catergory); cJSON* first = cJSON_GetObjectItem((cJSON*)json_root, catergory);
if (!first) return false; if (!first) return false;