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>
This commit is contained in:
Andy Shaw
2012-07-24 09:36:02 +02:00
committed by Oswald Buddenhagen
parent cebf6b9329
commit a4bd79f732

View File

@@ -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'"') {