Author: hpoussin
Date: Sun Jun 4 18:10:21 2006
New Revision: 22207
URL:
http://svn.reactos.ru/svn/reactos?rev=22207&view=rev
Log:
Convert result struct only if NtUserEnumDisplaySettings returned success
Modified:
trunk/reactos/dll/win32/user32/misc/display.c
Modified: trunk/reactos/dll/win32/user32/misc/display.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/user32/misc/displ…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/display.c (original)
+++ trunk/reactos/dll/win32/user32/misc/display.c Sun Jun 4 18:10:21 2006
@@ -218,6 +218,8 @@
rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &lpDevModeW,
dwFlags );
+ if (!rc)
+ goto done;
#define COPYS(f,len) WideCharToMultiByte( CP_THREAD_ACP, 0, lpDevModeW.f, len,
(LPSTR)lpDevMode->f, len, NULL, NULL )
#define COPYN(f) lpDevMode->f = lpDevModeW.f