diff --git a/include/config_parser.h b/include/config_parser.h index 979d1da..544f497 100644 --- a/include/config_parser.h +++ b/include/config_parser.h @@ -91,8 +91,8 @@ private: std::string moduleName_; ModuleType moduleType_; std::string mainAbility_; - int32_t abilityIconId_; - int32_t abilityLabelId_; + int64_t abilityIconId_; + int64_t abilityLabelId_; std::map> jsonCheckIds_; static const std::map MODULE_TYPES; static const std::map JSON_STRING_IDS; diff --git a/src/config_parser.cpp b/src/config_parser.cpp index 2e96cd4..15b3d27 100644 --- a/src/config_parser.cpp +++ b/src/config_parser.cpp @@ -379,7 +379,7 @@ bool ConfigParser::ParseJsonArrayRef(cJSON *parent, const string &key, cJSON *no return false; } if (update) { - cJSON_AddItemToArray(array, cJSON_CreateNumber(atoi(value.c_str()))); + cJSON_AddItemToArray(array, cJSON_CreateNumber(atoll(value.c_str()))); } } cJSON_AddItemToObject(parent, (key + "Id").c_str(), array); @@ -407,8 +407,8 @@ bool ConfigParser::ParseJsonStringRef(cJSON *parent, const string &key, cJSON *n return false; } if (update) { - cJSON_AddItemToObject(parent, (key + "Id").c_str(), cJSON_CreateNumber(atoi(value.c_str()))); - AddCheckNode(key, static_cast(atoi(value.c_str()))); + cJSON_AddItemToObject(parent, (key + "Id").c_str(), cJSON_CreateNumber(atoll(value.c_str()))); + AddCheckNode(key, static_cast(atoll(value.c_str()))); } return true; }