From: Jacek Caban Subject: mshtml: Don't unclude leading '?' in nsIURL::GetSearch implementation. Message-Id: <541C0CB1.4020507@codeweavers.com> Date: Fri, 19 Sep 2014 13:00:01 +0200 --- 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)