Skip to content
Snippets Groups Projects
Commit 3c1edaaa authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard
Browse files

advapi32: Set last error directly in GetUserName.

parent 1a7dd7cd
Branches
Tags
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment