mshtml: Alloc proper BSTR size in return_nscstr.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
46de3fcf1d
commit
9f4d05b11c
|
@ -29,6 +29,7 @@ function test_xhr() {
|
|||
next_test();
|
||||
}
|
||||
var onload_func = xhr.onload = function() {
|
||||
ok(xhr.statusText === "OK", "statusText = " + xhr.statusText);
|
||||
if(complete_cnt++)
|
||||
next_test();
|
||||
};
|
||||
|
|
|
@ -80,7 +80,7 @@ static HRESULT return_nscstr(nsresult nsres, nsACString *nscstr, BSTR *p)
|
|||
|
||||
if(*str) {
|
||||
len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
|
||||
*p = SysAllocStringLen(NULL, len);
|
||||
*p = SysAllocStringLen(NULL, len - 1);
|
||||
if(!*p) {
|
||||
nsACString_Finish(nscstr);
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
Loading…
Reference in New Issue