diff options
Diffstat (limited to 'src/Common/Language.c')
-rw-r--r-- | src/Common/Language.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Common/Language.c b/src/Common/Language.c index ba0b6d19..278b7dd1 100644 --- a/src/Common/Language.c +++ b/src/Common/Language.c @@ -209,6 +209,7 @@ static BOOL LoadLanguageData (int resourceid, BOOL bForceSetPreferredLanguage, B LocalizationActive = FALSE; ActiveLangPackVersion[0] = 0; ClearDictionaryPool (); + LanguageResource = NULL; if ((resourceid == 0) && (PreferredLangId[0] != 0)) StringCbCopyA (langId, sizeof(langId), PreferredLangId); @@ -610,7 +611,8 @@ char *GetPreferredLangId () void SetPreferredLangId (char *langId) { - StringCbCopyA (PreferredLangId, sizeof(PreferredLangId), langId); + if (strlen(langId) < sizeof(PreferredLangId)) + StringCbCopyA (PreferredLangId, sizeof(PreferredLangId), langId); } |