wine/dlls/shell32 shlexec.c

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 30 14:54:46 CST 2005


ChangeSet ID:	21572
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/30 14:54:46

Modified files:
	dlls/shell32   : shlexec.c 

Log message:
	Martin Fuchs <martin-fuchs at gmx.net>
	Fix context menu handling for more than one entry in order to repair
	.lnk-file execution: Don't break at the first non-matching entry.

Patch: http://cvs.winehq.org/patch.py?id=21572

Old revision  New revision  Changes     Path
 1.77          1.78          +8 -8       wine/dlls/shell32/shlexec.c

Index: wine/dlls/shell32/shlexec.c
diff -u -p wine/dlls/shell32/shlexec.c:1.77 wine/dlls/shell32/shlexec.c:1.78
--- wine/dlls/shell32/shlexec.c:1.77	30 Nov 2005 20:54:46 -0000
+++ wine/dlls/shell32/shlexec.c	30 Nov 2005 20:54:46 -0000
@@ -1156,15 +1156,15 @@ static LONG ShellExecute_FromContextMenu
             r = RegEnumKeyW( hkeycm, i++, szguid, 39 );
             if ( r != ERROR_SUCCESS )
                 break;
-            r = ERROR_FUNCTION_FAILED;
+
             hr = CLSIDFromString( szguid, &guid );
-            if ( FAILED( hr ) )
-                break;
-            r = ERROR_SUCCESS;
-            /* stop at the first one that succeeds in running */
-            hr = shellex_load_object_and_run( hkey, &guid, sei );
-            if ( SUCCEEDED( hr ) )
-                break;
+            if (SUCCEEDED(hr))
+            {
+                /* stop at the first one that succeeds in running */
+                hr = shellex_load_object_and_run( hkey, &guid, sei );
+                if ( SUCCEEDED( hr ) )
+                    break;
+            }
         }
         RegCloseKey( hkeycm );
     }



More information about the wine-cvs mailing list