don't loop (UINT)-1 times if the section is not present, CID 445
authorKamil Hornicek <kamil.hornicek@reactos.org>
Wed, 15 Oct 2008 18:59:47 +0000 (18:59 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Wed, 15 Oct 2008 18:59:47 +0000 (18:59 +0000)
svn path=/trunk/; revision=36764

reactos/dll/cpl/intl/advanced.c

index 0ade7e3..2a83ed1 100644 (file)
@@ -26,14 +26,15 @@ static HWND hLangList;
 static BOOL
 GetSupportedCP(VOID)
 {
-    UINT uiCPage, Count, Number;
+    UINT uiCPage, Number;
+    LONG Count;
     INFCONTEXT infCont;
     LPCPAGE lpCPage;
     HANDLE hCPage;
     CPINFOEX cpInfEx;
     //TCHAR Section[MAX_PATH];
 
-    Count = (UINT) SetupGetLineCount(hIntlInf, _T("CodePages"));
+    Count = SetupGetLineCount(hIntlInf, _T("CodePages"));
     if (Count <= 0) return FALSE;
 
     for (Number = 0; Number < Count; Number++)