| 929 | } |
| 930 | |
| 931 | static void url_unescape( WCHAR *s ) |
| 932 | { |
| 933 | unsigned int i, len; |
| 934 | unsigned char c, d1, d2; |
| 935 | |
| 936 | len = wcslen( s ); |
| 937 | if (len < 3) return; |
| 938 | for (i = 0; i < len - 3; ++i) |
| 939 | { |
| 940 | if (s[i] != '%') continue; |
| 941 | if ((d1 = hexdigit( s[i + 1] )) == 0xff || (d2 = hexdigit( s[i + 2] )) == 0xff) |
| 942 | { |
| 943 | ERR( "Invalid escape %s.\n", debugstr_wn( s, 3 ) ); |
| 944 | continue; |
| 945 | } |
| 946 | s[i] = d1 * 0x10 + d2; |
| 947 | len -= 2; |
| 948 | memmove( &s[i + 1], &s[i + 3], (len - i) * sizeof(*s) ); |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | char *steamclient_dos_to_unix_path( const char *src, int is_url ) |
| 953 | { |
no test coverage detected