From 03adaea1650bf61b6c77bcde25adeb9b317f14cb Mon Sep 17 00:00:00 2001 From: Stefan Leichter Date: Wed, 23 Oct 2002 18:44:13 +0000 Subject: [PATCH] Do not break quoted strings in Control_DoLaunch. --- dlls/shell32/control.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c index 46eb8cb0c25..f4068d55aa8 100644 --- a/dlls/shell32/control.c +++ b/dlls/shell32/control.c @@ -317,6 +317,7 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCSTR cmd) char ch; unsigned sp = 0; char* extraPmts = NULL; + int quoted = 0; buffer = HeapAlloc(GetProcessHeap(), 0, strlen(cmd) + 1); if (!buffer) return; @@ -325,7 +326,8 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCSTR cmd) for (;;) { ch = *end; - if (ch == ' ' || ch == ',' || ch == '\0') { + if (ch == '"') quoted = !quoted; + if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) { *end = '\0'; if (beg) { if (*beg == '@') { @@ -342,6 +344,9 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCSTR cmd) } end++; } + + TRACE("cmd %s, extra %s, sp %d\n", buffer, debugstr_a(extraPmts), sp); + Control_LoadApplet(hWnd, buffer, panel); if (panel->first) {