[CLI] CLI output cleanup:
authorOleg Lekarev <o.lekarev@samsung.com>
Mon, 22 Nov 2021 13:53:15 +0000 (16:53 +0300)
committerAlexander Soldatov/Platform Lab /SRR/Staff Engineer/Samsung Electronics <soldatov.a@samsung.com>
Thu, 2 Dec 2021 16:59:07 +0000 (19:59 +0300)
- remove unneeded empty lines;
- display resolved line breakpoints filenames (bugfix)

src/metadata/modules.cpp
src/protocols/cliprotocol.cpp

index cd23867226719cce19c93a17d426e6962652b8f6..78b2456754768f0593002063cfa1f9f9c8b0de6d 100644 (file)
@@ -1213,7 +1213,7 @@ HRESULT Modules::GetSourceFullPathByIndex(unsigned index, std::string &fullPath)
 {
     std::lock_guard<std::mutex> lock(m_sourcesInfoMutex);
 
-    if (m_sourceIndexToPath.size() >= index)
+    if (m_sourceIndexToPath.size() <= index)
         return E_FAIL;
 
 #ifndef _WIN32
index 3daf5c30c920d8bc64e76f1b6980a238ca30c802..9a0b6358526f94dc83c6d9c247cfcdb08f03664e 100644 (file)
@@ -2346,7 +2346,8 @@ HRESULT CLIProtocol::execCommands(LineReader&& lr, bool printCommands)
 
         if (SUCCEEDED(hr))
         {
-            printf("%.*s%s\n", int(prefix.size()), prefix.data(), output.c_str());
+            if (!output.empty())
+                printf("%.*s%s\n", int(prefix.size()), prefix.data(), output.c_str());
         }
         else
         {