shell32: Properly double-null-terminate the filter in the run/browse dialog.

Vincent Povirk madewokherd at gmail.com
Sun Feb 26 13:09:29 CST 2012


-------------- next part --------------
From 9ba5227bf3860cb5bb867eea3a646f5f04f242d7 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Sun, 26 Feb 2012 13:05:00 -0600
Subject: [PATCH] shell32: Properly double-null-terminate the filter in the run/browse dialog.

We had the %c in the format string for the last null, but we weren't filling
it with anything. This was causing a garbage filter to show in the dialog.
---
 dlls/shell32/dialogs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c
index 84d8799..28a25fd 100644
--- a/dlls/shell32/dialogs.c
+++ b/dlls/shell32/dialogs.c
@@ -266,7 +266,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
                     LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_FILTER_EXE, filter_exe, 256);
                     LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_FILTER_ALL, filter_all, 256);
                     LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_CAPTION, szCaption, MAX_PATH);
-                    snprintfW( filter, MAX_PATH, filterW, filter_exe, 0, 0, filter_all, 0 );
+                    snprintfW( filter, MAX_PATH, filterW, filter_exe, 0, 0, filter_all, 0, 0 );
 
                     ZeroMemory(&ofn, sizeof(ofn));
                     ofn.lStructSize = sizeof(OPENFILENAMEW);
-- 
1.7.2.5


More information about the wine-patches mailing list