i18n array smashing fix.
This commit is contained in:
parent
a138e71455
commit
2ad4de22bf
|
@ -72,12 +72,7 @@ void setLanguage(char *applicationName, char *languageCode)
|
|||
STRNCPY(language, languageCode, MAX_LINE_LENGTH);
|
||||
}
|
||||
|
||||
if (strstr(language, ".") != NULL)
|
||||
{
|
||||
lang = strtok(language, ".");
|
||||
|
||||
STRNCPY(language, lang, MAX_LINE_LENGTH);
|
||||
}
|
||||
strtok(language, ".");
|
||||
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Locale is %s", language);
|
||||
|
||||
|
@ -100,9 +95,7 @@ void setLanguage(char *applicationName, char *languageCode)
|
|||
return;
|
||||
}
|
||||
|
||||
lang = strtok(language, "_");
|
||||
|
||||
STRNCPY(language, lang, MAX_LINE_LENGTH);
|
||||
strtok(language, "_");
|
||||
|
||||
sprintf(c, "%s/%s/LC_MESSAGES/%s.mo", LOCALE_DIR, language, applicationName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue