eric pouech (@epo) commented about dlls/kernelbase/console.c:
WCHAR *ptr = HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR) * size ); DWORD ret;
- if (!ptr) return 0;
- ret = GetConsoleTitleW( ptr, size );
- if (ret)
- if (!ptr) {
WideCharToMultiByte( GetConsoleOutputCP(), 0, ptr, ret + 1, title, size, NULL, NULL);
ret = strlen(title);
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
I don't think you need to call SetLastError; HeapAlloc should already have set it