Commit 3c1edaaa authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

advapi32: Set last error directly in GetUserName.

parent 1a7dd7cd
......@@ -49,6 +49,7 @@ BOOL WINAPI GetUserNameA( LPSTR name, LPDWORD size )
if (!len) return FALSE;
if ((ret = (len < *size))) len++;
else SetLastError( ERROR_INSUFFICIENT_BUFFER );
*size = len;
return ret;
}
......@@ -64,6 +65,7 @@ BOOL WINAPI GetUserNameW( LPWSTR name, LPDWORD size )
if (!len) return FALSE;
if ((ret = (len < *size))) len++;
else SetLastError( ERROR_INSUFFICIENT_BUFFER );
*size = len;
return ret;
}
......
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