Skip to content

Commit

Permalink
Fix #13014: GUI: wrong misra command if misra rule texts is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
swasti16 committed Aug 14, 2024
1 parent 35a0df1 commit 85d07f5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/addoninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ 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<picojson::array>())
return "Loading " + fileName + " failed. 'args' must be an array.";
for (const picojson::value &v : val.get<picojson::array>()) {
if (!v.is<std::string>())
return "Loading " + fileName + " failed. 'args' entry is not a string.";
addoninfo.args += " " + v.get<std::string>();
}
if (!val.is<std::string>())
return "Loading " + fileName + " failed. 'args' entry is not a string.";
addoninfo.args = val.get<std::string>();
}
else {
addoninfo.args = "";
}
}

Expand Down

0 comments on commit 85d07f5

Please sign in to comment.