From a4bd79f7328b5d25f7acaf3c2bfba4f9d954cca0 Mon Sep 17 00:00:00 2001
From: Andy Shaw <andy.shaw@digia.com>
Date: Tue, 24 Jul 2012 09:36:02 +0200
Subject: [PATCH] Ensure first quote is accounted for when stripping the
 command itself

When the command line was processed to remove the call itself, it would
not be removed correctly if it was quoted because it would not see the
first quote.

Task-number: QTCREATORBUG-7656

Change-Id: I016b1534e14563ddd8cadad8c0effcd6b4a9203b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
---
 src/libs/utils/process_ctrlc_stub.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libs/utils/process_ctrlc_stub.cpp b/src/libs/utils/process_ctrlc_stub.cpp
index 2036e3820f1..f3535693f9a 100644
--- a/src/libs/utils/process_ctrlc_stub.cpp
+++ b/src/libs/utils/process_ctrlc_stub.cpp
@@ -86,7 +86,7 @@ int main(int argc, char **)
     // Get the command line and remove the call to this executable.
     wchar_t *strCommandLine = _wcsdup(GetCommandLine());
     const size_t strCommandLineLength = wcslen(strCommandLine);
-    size_t pos = 1;
+    size_t pos = 0;
     bool quoted = false;
     while (pos < strCommandLineLength) {
         if (strCommandLine[pos] == L'"') {
-- 
GitLab