shlwapi: fix UrlUnescapeW
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Mon Oct 4 16:11:22 CDT 2004
Huw Davies <huw at codeweavers.com>
Fix UrlUnescapeW
Index: dlls/shlwapi/url.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/url.c,v
retrieving revision 1.40
diff -u -r1.40 url.c
--- dlls/shlwapi/url.c 4 Oct 2004 19:08:50 -0000 1.40
+++ dlls/shlwapi/url.c 4 Oct 2004 20:56:53 -0000
@@ -1172,10 +1172,10 @@
} else if(*src == L'%' && isxdigitW(*(src + 1)) && isxdigitW(*(src + 2))
&& stop_unescaping == FALSE) {
INT ih;
- WCHAR buf[3];
- memcpy(buf, src + 1, 2*sizeof(WCHAR));
- buf[2] = L'\0';
- ih = StrToIntW(buf);
+ WCHAR buf[5] = {'0','x',0};
+ memcpy(buf + 2, src + 1, 2*sizeof(WCHAR));
+ buf[4] = 0;
+ StrToIntExW(buf, STIF_SUPPORT_HEX, &ih);
next = (WCHAR) ih;
src += 2; /* Advance to end of escape */
} else
More information about the wine-patches
mailing list