[PATCH] kernelbase: When enumerating calendars initialize optional to 0.

Dmitry Timoshkov dmitry at baikal.ru
Wed Nov 20 23:22:54 CST 2019


This fixes regression introduced by 42ed9797b1929fc5917bd967f7062cab953fab55.
Without this patch Internal_EnumCalendarInfo() goes into infinite loop when
asked to enumerate particular calendar id.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/kernelbase/locale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index 4ec5016b3f..073d759936 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -173,7 +173,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH Internal_EnumCalendarInfo( CALINFO_ENUMPROCW proc,
                                                          BOOL exex, LPARAM lparam )
 {
     WCHAR buffer[256];
-    DWORD optional;
+    DWORD optional = 0;
     INT ret;
 
     if (!proc)
-- 
2.20.1




More information about the wine-devel mailing list