From 11de4958059f80f2343780de87e6c17a7c977f6b 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 --- gui/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index e73d48d3e53..099099a977c 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1006,11 +1006,13 @@ QString MainWindow::loadAddon(Settings &settings, const QString &filesDir, const const QString misraFile = fromNativePath(mSettings->value(SETTINGS_MISRA_FILE).toString()); if (!misraFile.isEmpty()) { QString arg; + picojson::array arr; if (misraFile.endsWith(".pdf", Qt::CaseInsensitive)) arg = "--misra-pdf=" + misraFile; else arg = "--rule-texts=" + misraFile; - obj["args"] = picojson::value(arg.toStdString()); + arr.emplace_back(arg.toStdString()); + obj["args"] = picojson::value(arr); } }