From 06471d3eb5b4bdf3a18e0146514426c57bfc4527 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 9 Mar 2008 15:34:13 +0000 Subject: [PATCH] - fix enumeration of available time zones svn path=/trunk/; revision=32626 --- reactos/dll/cpl/timedate/timezone.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/dll/cpl/timedate/timezone.c b/reactos/dll/cpl/timedate/timezone.c index b706041bae2..1c3ea7cc7db 100644 --- a/reactos/dll/cpl/timedate/timezone.c +++ b/reactos/dll/cpl/timedate/timezone.c @@ -89,7 +89,7 @@ CreateTimeZoneList(VOID) NULL, NULL, NULL); - if (lError != ERROR_SUCCESS && lError != ERROR_MORE_DATA) + if (lError == ERROR_NO_MORE_ITEMS) break; if (RegOpenKeyEx (hZonesKey, @@ -107,15 +107,18 @@ CreateTimeZoneList(VOID) } dwValueSize = 64 * sizeof(WCHAR); - if (RegQueryValueExW(hZoneKey, + lError = RegQueryValueExW(hZoneKey, L"Display", NULL, NULL, (LPBYTE)&Entry->Description, - &dwValueSize)) + &dwValueSize); + if (lError != ERROR_SUCCESS) { RegCloseKey(hZoneKey); - break; + dwIndex++; + HeapFree(GetProcessHeap(), 0, Entry); + continue; } dwValueSize = 33 * sizeof(WCHAR);