Module: wine Branch: master Commit: 47a7d835d4e62f45516f76464c7661b6a5482a9e URL: http://source.winehq.org/git/wine.git/?a=commit;h=47a7d835d4e62f45516f76464c...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Sep 19 13:00:01 2014 +0200
mshtml: Don't include leading '?' in nsIURL::GetSearch implementation.
---
dlls/mshtml/nsio.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 901b5b9..9335428 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2627,10 +2627,27 @@ static nsresult NSAPI nsURL_SetFilePath(nsIFileURL *iface, const nsACString *aFi static nsresult NSAPI nsURL_GetQuery(nsIFileURL *iface, nsACString *aQuery) { nsWineURI *This = impl_from_nsIFileURL(iface); + WCHAR *ptr; + BSTR query; + nsresult nsres; + HRESULT hres;
TRACE("(%p)->(%p)\n", This, aQuery);
- return get_uri_string(This, Uri_PROPERTY_QUERY, aQuery); + if(!ensure_uri(This)) + return NS_ERROR_UNEXPECTED; + + hres = IUri_GetQuery(This->uri, &query); + if(FAILED(hres)) + return NS_ERROR_FAILURE; + + ptr = query; + if(ptr && *ptr == '?') + ptr++; + + nsres = return_wstr_nsacstr(aQuery, ptr, -1); + SysFreeString(query); + return nsres; }
static nsresult NSAPI nsURL_SetQuery(nsIFileURL *iface, const nsACString *aQuery)