Author: jimtabor
Date: Fri Nov 1 06:43:56 2013
New Revision: 60820
URL:
http://svn.reactos.org/svn/reactos?rev=60820&view=rev
Log:
[User32]
- Fix a condition that fails the dialog test_GetDlgItemText after running the msg test
then run dialog again.
Modified:
trunk/reactos/win32ss/user/user32/windows/dialog.c
Modified: trunk/reactos/win32ss/user/user32/windows/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/dialog.c [iso-8859-1] Fri Nov 1 06:43:56
2013
@@ -2126,9 +2126,12 @@
int nIDDlgItem)
{
int i;
- HWND *list = WIN_ListChildren(hDlg);
+ HWND *list;
HWND ret = 0;
+ if (!hDlg) return 0;
+
+ list = WIN_ListChildren(hDlg);
if (!list) return 0;
for (i = 0; list[i]; i++) if (GetWindowLongPtrW(list[i], GWLP_ID) == nIDDlgItem)
break;
@@ -2190,7 +2193,7 @@
{
HWND hWnd = GetDlgItem(hDlg, nIDDlgItem);
if ( hWnd ) return GetWindowTextA(hWnd, lpString, nMaxCount);
- if ( nMaxCount ) *lpString = 0;
+ if ( nMaxCount ) lpString[0] = '\0';
return 0;
}
@@ -2208,7 +2211,7 @@
{
HWND hWnd = GetDlgItem(hDlg, nIDDlgItem);
if ( hWnd ) return GetWindowTextW(hWnd, lpString, nMaxCount);
- if ( nMaxCount ) *lpString = 0;
+ if ( nMaxCount ) lpString[0] = '\0';
return 0;
}