Skip to content

Commit 6265add

Browse files
authored
[SHELL32] Don't close Run dialog on execution failure (reactos#7686)
CORE-19983
1 parent dddceeb commit 6265add

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

dll/win32/shell32/dialogs/dialogs.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA
583583
INT ic;
584584
WCHAR *psz, *pszExpanded, *parent = NULL;
585585
DWORD cchExpand;
586-
SHELLEXECUTEINFOW sei;
586+
SHELLEXECUTEINFOW sei = { sizeof(sei) };
587587
NMRUNFILEDLGW nmrfd;
588588

589589
ic = GetWindowTextLengthW(htxt);
@@ -593,9 +593,6 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA
593593
return TRUE;
594594
}
595595

596-
ZeroMemory(&sei, sizeof(sei));
597-
sei.cbSize = sizeof(sei);
598-
599596
/*
600597
* Allocate a new MRU entry, we need to add two characters
601598
* for the terminating "\\1" part, then the NULL character.
@@ -694,7 +691,7 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA
694691
EndDialog(hwnd, IDOK);
695692
break;
696693
}
697-
else if (SUCCEEDED(ShellExecuteExW(&sei)))
694+
else if (ShellExecuteExW(&sei))
698695
{
699696
/* Call GetWindowText again in case the contents of the edit box have changed. */
700697
GetWindowTextW(htxt, psz, ic + 1);

0 commit comments

Comments
 (0)