mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 06:48:26 -04:00
[wue] allow the provision of an arbitrary local account username
* This is required because, even though it's easy to change a local account name post install, doing so does not change the directory name in C:\Users\
This commit is contained in:
parent
cee21b1981
commit
c19ef1125d
10 changed files with 151 additions and 105 deletions
|
@ -345,6 +345,8 @@ static __inline int GetWindowTextU(HWND hWnd, char* lpString, int nMaxCount)
|
|||
{
|
||||
int ret = 0;
|
||||
DWORD err = ERROR_INVALID_DATA;
|
||||
if (nMaxCount < 0)
|
||||
return 0;
|
||||
// Handle the empty string as GetWindowTextW() returns 0 then
|
||||
if ((lpString != NULL) && (nMaxCount > 0))
|
||||
lpString[0] = 0;
|
||||
|
@ -357,6 +359,7 @@ static __inline int GetWindowTextU(HWND hWnd, char* lpString, int nMaxCount)
|
|||
err = GetLastError();
|
||||
}
|
||||
wfree(lpString);
|
||||
lpString[nMaxCount - 1] = 0;
|
||||
SetLastError(err);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue