mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-30 05:17:23 +02:00
committed by
Sam Lantinga
parent
e29c0661cc
commit
d0bbfdbfb8
@@ -48,7 +48,8 @@ void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
|
||||
// convert '-' to '_'...
|
||||
// These are always full lang-COUNTRY, so we search from the back,
|
||||
// so things like zh-Hant-CN find the right '-' to convert.
|
||||
if ((ptr = SDL_strrchr(buf, '-')) != NULL) {
|
||||
ptr = SDL_strrchr(buf, '-');
|
||||
if (ptr != NULL) {
|
||||
*ptr = '_';
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static void SDL_SYS_GetPreferredLocales_winxp(char *buf, size_t buflen)
|
||||
if (langrc == 0) {
|
||||
SDL_SetError("Couldn't obtain language info");
|
||||
} else {
|
||||
SDL_snprintf(buf, buflen, "%s%s%s", lang, ctryrc ? "_" : "", ctryrc ? country : "");
|
||||
(void)SDL_snprintf(buf, buflen, "%s%s%s", lang, ctryrc ? "_" : "", ctryrc ? country : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user