[INTL]
[reactos.git] / reactos / dll / cpl / intl / advanced.c
index 6f74b2a..3c9f511 100644 (file)
@@ -61,19 +61,20 @@ GetSupportedCP(
             {
                 pCodePage->NextItem = PCPage;
                 PCPage = pCodePage;
+
+                wsprintf(szSection, L"CODEPAGE_REMOVE_%d", uiCodePage);
+
+                if ((uiCodePage == GetACP()) ||
+                    (uiCodePage == GetOEMCP()) ||
+                    (!SetupFindFirstLineW(hInf, szSection, L"AddReg", &Context2)))
+                {
+                    pCodePage->Flags |= CODEPAGE_NOT_REMOVEABLE;
+                }
             }
             else
             {
                 HeapFree(GetProcessHeap(), 0, pCodePage);
             }
-
-            wsprintf(szSection, L"CODEPAGE_REMOVE_%d", uiCodePage);
-            if ((uiCodePage == GetACP()) ||
-                (uiCodePage == GetOEMCP()) ||
-                (!SetupFindFirstLineW(hInf, szSection, L"AddReg", &Context2)))
-            {
-                pCodePage->Flags |= CODEPAGE_NOT_REMOVEABLE;
-            }
         }
 
         if (!SetupFindNextLine(&Context, &Context))