r5sdk/r5dev/engine/sys_dll.cpp
Kawe Mazidjatari 020986fc3b Remove unnecessary newline
Most error messages have newlines. If they are absent, they get appended automatically.
2023-02-19 00:44:43 +01:00

29 lines
901 B
C++

#include "core/stdafx.h"
#include "engine/sys_dll.h"
//-----------------------------------------------------------------------------
// Sys_Error_Internal
//
//-----------------------------------------------------------------------------
int HSys_Error_Internal(char* fmt, va_list args)
{
char buffer[2048]{};
Error(eDLL_T::COMMON, NO_ERROR, "_______________________________________________________________\n");
Error(eDLL_T::COMMON, NO_ERROR, "] ENGINE ERROR ################################################\n");
vsprintf(buffer, fmt, args);
Error(eDLL_T::COMMON, NO_ERROR, "%s", buffer);
///////////////////////////////////////////////////////////////////////////
return Sys_Error_Internal(fmt, args);
}
void VSys_Dll::Attach() const
{
DetourAttach(&Sys_Error_Internal, &HSys_Error_Internal);
}
void VSys_Dll::Detach() const
{
DetourDetach(&Sys_Error_Internal, &HSys_Error_Internal);
}