https://git.reactos.org/?p=reactos.git;a=commitdiff;h=38160b207d263849c83440...
commit 38160b207d263849c83440bee473690ffb222180 Author: Eric Kohl eric.kohl@reactos.org AuthorDate: Mon Jan 7 22:45:33 2019 +0100 Commit: Eric Kohl eric.kohl@reactos.org CommitDate: Mon Jan 7 22:45:33 2019 +0100
[KERNEL32] GetComputerNameExW: Fix crash in kernel32_winetest environ test --- dll/win32/kernel32/client/compname.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dll/win32/kernel32/client/compname.c b/dll/win32/kernel32/client/compname.c index 96aa505aed..cfe9df5137 100644 --- a/dll/win32/kernel32/client/compname.c +++ b/dll/win32/kernel32/client/compname.c @@ -236,7 +236,8 @@ GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, L"ComputerName", lpBuffer, nSize); - if (ret == FALSE) + if ((ret == FALSE) && + (GetLastError() != ERROR_MORE_DATA)) { ret = GetComputerNameFromRegistry(L"\Registry\Machine\System\CurrentControlSet" L"\Control\ComputerName\ComputerName",