diff options
Diffstat (limited to 'src/Common/Language.c')
-rw-r--r-- | src/Common/Language.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Common/Language.c b/src/Common/Language.c index 844f4dad..278b7dd1 100644 --- a/src/Common/Language.c +++ b/src/Common/Language.c @@ -611,7 +611,8 @@ char *GetPreferredLangId () void SetPreferredLangId (char *langId) { - StringCbCopyA (PreferredLangId, sizeof(PreferredLangId), langId); + if (strlen(langId) < sizeof(PreferredLangId)) + StringCbCopyA (PreferredLangId, sizeof(PreferredLangId), langId); } |