src/locale/windows/SDL_syslocale.c
changeset 13843 cbd001bb0b89
parent 13797 55ec5ae4aa0b
child 13845 210fb62f0c96
equal deleted inserted replaced
13842:a09f7d0800eb 13843:cbd001bb0b89
    76     }
    76     }
    77 
    77 
    78     if (!pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numlangs, wbuf, &wbuflen)) {
    78     if (!pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numlangs, wbuf, &wbuflen)) {
    79         SDL_SYS_GetPreferredLocales_winxp(buf, buflen);  /* oh well, try the fallback. */
    79         SDL_SYS_GetPreferredLocales_winxp(buf, buflen);  /* oh well, try the fallback. */
    80     } else {
    80     } else {
    81         const ULONG endidx = SDL_min(buflen, wbuflen - 1);
    81         const ULONG endidx = (ULONG) SDL_min(buflen, wbuflen - 1);
    82         ULONG str_start = 0;
    82         ULONG str_start = 0;
    83         ULONG i;
    83         ULONG i;
    84         for (i = 0; i < endidx; i++) {
    84         for (i = 0; i < endidx; i++) {
    85             const char ch = (char) wbuf[i];  /* these should all be low-ASCII, safe to cast */
    85             const char ch = (char) wbuf[i];  /* these should all be low-ASCII, safe to cast */
    86             if (ch == '\0') {
    86             if (ch == '\0') {