Commit dbc8f877 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Only return ERROR_MORE_DATA if there's a buffer to copy a result

into.
parent 0f7ef4bd
......@@ -142,7 +142,7 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz )
awbuf->str.a[*sz - 1] = 0;
}
if (len >= *sz)
if (awbuf->str.w && len >= *sz)
r = ERROR_MORE_DATA;
*sz = len;
return r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment