9 Aug
2023
9 Aug
'23
1:44 p.m.
Hans Leidekker (@hans) commented about programs/whoami/main.c:
+ +static int simple(EXTENDED_NAME_FORMAT name_format) +{ + WCHAR *name; + BOOL result; + + result = get_user_name(name_format, &name); + if (!result) + { + ERR("get_user_name failed\n"); return 1; }
- buf = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); - if (!buf) + unicode_wprintf(L"%ls\n", name); If you add this to output_write() as the first line:
if (len < 0) len = wcslen(str);
writing strings will look like this: ``` output_write(name, -1); output_write(L"\n", 1); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3473#note_41801