aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-07-24 09:36:02 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-24 17:29:42 +0200
commita4bd79f7328b5d25f7acaf3c2bfba4f9d954cca0 (patch)
tree1bc9dee4e7650be2ed31758dbb37863f9475fcf8
parentcebf6b9329deeab410e09f09a17b9a611a40282d (diff)
Ensure first quote is accounted for when stripping the command itselfv2.5.1
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>
-rw-r--r--src/libs/utils/process_ctrlc_stub.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/utils/process_ctrlc_stub.cpp b/src/libs/utils/process_ctrlc_stub.cpp
index 2036e3820f..f3535693f9 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'"') {