[ros-diffs] [sgasiorek] 20080: merge 20065

sgasiorek at svn.reactos.com sgasiorek at svn.reactos.com
Sun Dec 11 21:22:25 CET 2005


merge 20065
Modified: branches/ros-branch-0_2_9/reactos/lib/shell32/control.c
  _____  

Modified: branches/ros-branch-0_2_9/reactos/lib/shell32/control.c
--- branches/ros-branch-0_2_9/reactos/lib/shell32/control.c
2005-12-11 20:04:38 UTC (rev 20079)
+++ branches/ros-branch-0_2_9/reactos/lib/shell32/control.c
2005-12-11 20:22:21 UTC (rev 20080)
@@ -352,6 +352,7 @@

     unsigned 	sp = 0;
     LPWSTR	extraPmts = NULL;
     int        quoted = 0;
+    BOOL	spSet = FALSE;
 
     buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) *
sizeof(*wszCmd));
     if (!buffer) return;
@@ -366,8 +367,10 @@
 	    if (beg) {
 	        if (*beg == '@') {
 		    sp = atoiW(beg + 1);
+                    spSet = TRUE;
 		} else if (*beg == '\0') {
 		    sp = 0;
+                    spSet = TRUE;
 		} else {
 		    extraPmts = beg;
 		}
@@ -381,6 +384,9 @@
     while ((ptr = StrChrW(buffer, '"')))
 	memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR));
 
+    while ((ptr = StrChrW(extraPmts, '"')))
+	memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR));
+
     TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer),
debugstr_w(extraPmts), sp);
 
     Control_LoadApplet(hWnd, buffer, panel);
@@ -393,6 +399,13 @@
 	  WARN("Out of bounds (%u >= %u), setting to 0\n", sp,
applet->count);
 	  sp = 0;
        }
+
+       if ((extraPmts)&&(!spSet))
+       {
+          while ((lstrcmpiW(extraPmts, applet->info[sp].szName)) && (sp
< applet->count))
+            sp++;
+       }
+
        if (applet->info[sp].dwSize) {
 	  if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp,
(LPARAM)extraPmts))
 	     applet->proc(applet->hWnd, CPL_DBLCLK, sp,
applet->info[sp].lData);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051211/09e9806b/attachment.html


More information about the Ros-diffs mailing list