mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add assert in 'CNetAdr::ToString'
Main thread only from now on. Any other thread should manually pass in a buffer.
This commit is contained in:
parent
df81d52398
commit
d69451466c
@ -5,6 +5,7 @@
|
||||
//===========================================================================//
|
||||
|
||||
#include "core/stdafx.h"
|
||||
#include "tier0/threadtools.h"
|
||||
#include "tier1/NetAdr.h"
|
||||
#include "tier1/strtools.h"
|
||||
#include "mathlib/swap.h"
|
||||
@ -110,6 +111,9 @@ bool CNetAdr::ComparePort(const CNetAdr& other) const
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
const char* CNetAdr::ToString(bool bOnlyBase) const
|
||||
{
|
||||
// Main thread only due to use of static buffers.
|
||||
Assert(ThreadInMainThread());
|
||||
|
||||
// Select a static buffer.
|
||||
static char s[4][128];
|
||||
static int slot = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user