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

into.
This commit is contained in:
Mike McCormack 2005-11-15 16:53:47 +00:00 committed by Alexandre Julliard
parent 0f7ef4bd8d
commit dbc8f877fc
1 changed files with 1 additions and 1 deletions

View File

@ -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;