Commit a20e7543 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

combase: Reorder checks (Coverity).

parent 9d5e4eda
...@@ -99,13 +99,13 @@ HRESULT WINAPI WindowsCreateStringReference(LPCWSTR ptr, UINT32 len, ...@@ -99,13 +99,13 @@ HRESULT WINAPI WindowsCreateStringReference(LPCWSTR ptr, UINT32 len,
return E_INVALIDARG; return E_INVALIDARG;
if (ptr == NULL && len > 0) if (ptr == NULL && len > 0)
return E_POINTER; return E_POINTER;
if (ptr[len] != '\0')
return E_INVALIDARG;
if (len == 0) if (len == 0)
{ {
*out = NULL; *out = NULL;
return S_OK; return S_OK;
} }
if (ptr[len] != '\0')
return E_INVALIDARG;
priv->buffer = (LPWSTR)ptr; priv->buffer = (LPWSTR)ptr;
priv->length = len; priv->length = len;
priv->reference = TRUE; priv->reference = TRUE;
......
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