src/locale/winrt/SDL_syslocale.c
changeset 13837 c18c3084bd77
parent 13835 3f63f707ca4f
equal deleted inserted replaced
13836:9ebb8a2929b7 13837:c18c3084bd77
    43     if (ret > 0)
    43     if (ret > 0)
    44     {
    44     {
    45         /* Need to convert LPWSTR to LPSTR, that is wide char to char. */
    45         /* Need to convert LPWSTR to LPSTR, that is wide char to char. */
    46         int i;
    46         int i;
    47 
    47 
    48         if (ret >= (buflen - 1) ) {
    48         if ( ((size_t) ret) >= (buflen - 1) ) {
    49             ret = (int) (buflen - 1);
    49             ret = (int) (buflen - 1);
    50         }
    50         }
    51         for (i = 0; i < ret; i++) {
    51         for (i = 0; i < ret; i++) {
    52             buf[i] = (char) wbuffer[i];  /* assume this was ASCII anyhow. */
    52             buf[i] = (char) wbuffer[i];  /* assume this was ASCII anyhow. */
    53         }
    53         }