From 08f6dbd64718ca9feeb90590e3f8b09a3ad61a65 Mon Sep 17 00:00:00 2001 From: swasti16 Date: Wed, 14 Aug 2024 21:09:56 +0530 Subject: [PATCH] Fix #13014: GUI: wrong misra command if misra rule texts is specified --- lib/addoninfo.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/addoninfo.cpp b/lib/addoninfo.cpp index f0b15eac7a6d..7bd1b84769ae 100644 --- a/lib/addoninfo.cpp +++ b/lib/addoninfo.cpp @@ -60,13 +60,9 @@ static std::string parseAddonInfo(AddonInfo& addoninfo, const picojson::value &j const auto it = obj.find("args"); if (it != obj.cend()) { const auto& val = it->second; - if (!val.is()) - return "Loading " + fileName + " failed. 'args' must be an array."; - for (const picojson::value &v : val.get()) { - if (!v.is()) - return "Loading " + fileName + " failed. 'args' entry is not a string."; - addoninfo.args += " " + v.get(); - } + if (!val.is()) + return "Loading " + fileName + " failed. 'args' entry is not a string."; + addoninfo.args += " " + val.get(); } }