diff --git a/reactos/dll/cpl/intl/advanced.c b/reactos/dll/cpl/intl/advanced.c index 6f74b2a82e7..3c9f51101fe 100644 --- a/reactos/dll/cpl/intl/advanced.c +++ b/reactos/dll/cpl/intl/advanced.c @@ -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))