1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Handled some method slotting reentrancy issues

This commit is contained in:
Brian Fiete 2021-08-02 10:44:39 -07:00
parent 879ac7f989
commit dd37d6c092
6 changed files with 55 additions and 21 deletions

View file

@ -13,6 +13,9 @@
#include "BeefySysLib/util/AllocDebug.h"
#define STB_SPRINTF_DECORATE(name) BF_stbsp_##name
#include "../../third_party/stb/stb_sprintf.h"
USING_NS_BF;
using namespace llvm;
@ -64,11 +67,8 @@ void Beefy::DoBfLog(int fileIdx, const char* fmt ...)
va_list argList;
va_start(argList, fmt);
#ifdef _WIN32
int numChars = _vsnprintf(lineStr + strOfs, maxChars, fmt, argList);
#else
int numChars = vsnprintf(lineStr+ strOfs, maxChars, fmt, argList);
#endif
int numChars = BF_stbsp_vsnprintf(lineStr + strOfs, maxChars, fmt, argList);
if (numChars <= maxChars)
{
if (strOfs + numChars > 0)