[2/2] user32: FindWindow() should treat an empty title same way as NULL.

Dmitry Timoshkov dmitry at codeweavers.com
Tue Oct 5 09:03:30 CDT 2010


This patch makes the test for FindWindow() sent by Louis Lenders pass.
---
 dlls/user32/win.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index ee44278..7a6a3e4 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1756,7 +1756,14 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR t
     {
         while (list[i])
         {
-            if (GetWindowTextW( list[i], buffer, len + 1 ) && !strcmpiW( buffer, title )) break;
+            if (GetWindowTextW( list[i], buffer, len + 1 ))
+            {
+                if (!strcmpiW( buffer, title )) break;
+            }
+            else
+            {
+                if (!title[0]) break;
+            }
             i++;
         }
     }
-- 
1.7.0.6




More information about the wine-patches mailing list