mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix compile errors found with msvc /permissive-
(cherry picked from commit b3db50a3b4)
This commit is contained in:
@@ -425,7 +425,7 @@ void ShutdownCLIThread(std::thread* cliThread)
|
||||
// if CancelSynchronousIo fails with ERROR_NOT_FOUND then there was nothing to cancel, proceed with shutdown
|
||||
if (errorCode != ERROR_NOT_FOUND)
|
||||
{
|
||||
LPSTR errorBuffer;
|
||||
LPCSTR errorBuffer;
|
||||
DWORD numCharsWritten = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
nullptr, errorCode, 0, (LPTSTR)&errorBuffer, 0, nullptr);
|
||||
if (!numCharsWritten)
|
||||
@@ -434,7 +434,7 @@ void ShutdownCLIThread(std::thread* cliThread)
|
||||
TC_LOG_DEBUG("server.worldserver", "Error cancelling I/O of CliThread, error code %u, detail: %s", uint32(errorCode), errorBuffer);
|
||||
|
||||
if (numCharsWritten)
|
||||
LocalFree(errorBuffer);
|
||||
LocalFree((LPSTR)errorBuffer);
|
||||
|
||||
// send keyboard input to safely unblock the CLI thread
|
||||
INPUT_RECORD b[4];
|
||||
|
||||
Reference in New Issue
Block a user