mirror of https://github.com/FDOS/kernel.git
Pointer-ise specificCountriesSupported accesses.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@959 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
b3a2d6bfde
commit
0c00651565
|
@ -2418,6 +2418,7 @@ struct CountrySpecificInfo specificCountriesSupported[] = {
|
|||
STATIC int LoadCountryInfoHardCoded(char *filename, COUNT ctryCode, COUNT codePage)
|
||||
{
|
||||
int i;
|
||||
struct CountrySpecificInfo *country;
|
||||
UNREFERENCED_PARAMETER(codePage);
|
||||
UNREFERENCED_PARAMETER(filename);
|
||||
|
||||
|
@ -2425,30 +2426,34 @@ STATIC int LoadCountryInfoHardCoded(char *filename, COUNT ctryCode, COUNT codePa
|
|||
|
||||
|
||||
|
||||
for (i = 0; i < sizeof(specificCountriesSupported)/sizeof(specificCountriesSupported[0]); i++)
|
||||
for (country = specificCountriesSupported;
|
||||
country < specificCountriesSupported + LENGTH(specificCountriesSupported);
|
||||
country++)
|
||||
{
|
||||
if (specificCountriesSupported[i].CountryID == ctryCode)
|
||||
if (country->CountryID == ctryCode)
|
||||
{
|
||||
int codepagesaved = nlsCountryInfoHardcoded.C.CodePage;
|
||||
|
||||
fmemcpy(&nlsCountryInfoHardcoded.C.CountryID,
|
||||
&specificCountriesSupported[i],
|
||||
min(nlsCountryInfoHardcoded.TableSize, sizeof(struct CountrySpecificInfo)));
|
||||
fmemcpy(&nlsCountryInfoHardcoded.C.CountryID,
|
||||
country,
|
||||
min(nlsCountryInfoHardcoded.TableSize, sizeof *country));
|
||||
|
||||
nlsCountryInfoHardcoded.C.CodePage = codepagesaved;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf("could not find country info for country ID %u\n"
|
||||
"current supported countries are ", ctryCode);
|
||||
|
||||
for (i = 0; i < sizeof(specificCountriesSupported)/sizeof(specificCountriesSupported[0]); i++)
|
||||
for (country = specificCountriesSupported;
|
||||
country < specificCountriesSupported + LENGTH(specificCountriesSupported);
|
||||
country++)
|
||||
{
|
||||
printf("%u ",specificCountriesSupported[i].CountryID);
|
||||
printf("%u ", country->CountryID);
|
||||
}
|
||||
printf("\n");
|
||||
printf("\n");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue