From 2de4d515160f98f37ca426b861463ddecc85dc48 Mon Sep 17 00:00:00 2001 From: fangyunzhong Date: Tue, 19 Mar 2024 21:16:56 +0800 Subject: [PATCH] =?UTF-8?q?FA=E6=A8=A1=E5=9E=8B=E4=B8=8B=E7=BC=96=E8=AF=91?= =?UTF-8?q?bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fangyunzhong --- include/resource_data.h | 2 +- src/config_parser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/resource_data.h b/include/resource_data.h index 368bfaa..377a8ad 100644 --- a/include/resource_data.h +++ b/include/resource_data.h @@ -39,7 +39,7 @@ const static std::string NEW_LINE_PATH = "\nat "; const static std::string LONG_PATH_HEAD = "\\\\?\\"; const static int32_t VERSION_MAX_LEN = 128; const static int32_t INT_TO_BYTES = sizeof(uint32_t); -static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.004" }; +static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.005" }; const static int32_t TAG_LEN = 4; enum class KeyType { diff --git a/src/config_parser.cpp b/src/config_parser.cpp index b0bfc24..75f40ef 100644 --- a/src/config_parser.cpp +++ b/src/config_parser.cpp @@ -259,8 +259,8 @@ bool ConfigParser::ParseAbilities(const cJSON *abilities) bool ConfigParser::ParseAbilitiy(const cJSON *ability, bool &isMainAbility) { - if (!ability || !cJSON_IsArray(ability)) { - cerr << "Error: ability not array." << NEW_LINE_PATH << filePath_ << endl; + if (!ability || !cJSON_IsObject(ability)) { + cerr << "Error: ability not object." << NEW_LINE_PATH << filePath_ << endl; return false; } if (cJSON_GetArraySize(ability) == 0) {