Closed 0ric1 closed 5 years ago
Only if the caller passes an undefined error - and the WinErrorMsg code is broken for that case anyway, it should be:
auto len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM... theMsg.resize(len); if (theMsg.empty()) ...
To make it fail as an example: wcout << L"WinErrorMsg: " << WinErrorMsg(ERROR_HANDLE_DISK_FULL+1) << endl; I'll check in a fix for the bug.
wcout << L"WinErrorMsg: " << WinErrorMsg(ERROR_HANDLE_DISK_FULL+1) << endl;
Only if the caller passes an undefined error - and the WinErrorMsg code is broken for that case anyway, it should be:
To make it fail as an example:
wcout << L"WinErrorMsg: " << WinErrorMsg(ERROR_HANDLE_DISK_FULL+1) << endl;
I'll check in a fix for the bug.