locale: Fixed compiler warning on WinRT.

This commit is contained in:
Ryan C. Gordon 2020-05-20 16:43:02 -04:00
parent 8bd3b2c801
commit 539125b895

View File

@ -45,7 +45,7 @@ SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
/* Need to convert LPWSTR to LPSTR, that is wide char to char. */ /* Need to convert LPWSTR to LPSTR, that is wide char to char. */
int i; int i;
if (ret >= (buflen - 1) ) { if ( ((size_t) ret) >= (buflen - 1) ) {
ret = (int) (buflen - 1); ret = (int) (buflen - 1);
} }
for (i = 0; i < ret; i++) { for (i = 0; i < ret; i++) {