mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
Correct CSplitString constructors (#272)
Fixes potential crashes and invalid member access
This commit is contained in:
parent
9f1d960f6a
commit
05e47e5611
@ -1194,14 +1194,14 @@ public:
|
||||
class CSplitString: public CUtlVector<char*, CUtlMemory<char*, int> >
|
||||
{
|
||||
public:
|
||||
CSplitString(const char *pString, const char *pSeparator, bool bIncludeSeparators = false)
|
||||
CSplitString(const char *pString, const char *pSeparator, bool bIncludeSeparators = false) : m_szBuffer(nullptr)
|
||||
{
|
||||
Split( pString, 0, &pSeparator, 1, bIncludeSeparators);
|
||||
Split( pString, -1, &pSeparator, 1, bIncludeSeparators);
|
||||
}
|
||||
|
||||
CSplitString(const char *pString, const char **pSeparators, int nSeparators, bool bIncludeSeparators = false)
|
||||
CSplitString(const char *pString, const char **pSeparators, int nSeparators, bool bIncludeSeparators = false) : m_szBuffer(nullptr)
|
||||
{
|
||||
Split(pString, 0, pSeparators, nSeparators, bIncludeSeparators);
|
||||
Split(pString, -1, pSeparators, nSeparators, bIncludeSeparators);
|
||||
}
|
||||
|
||||
~CSplitString()
|
||||
|
Loading…
Reference in New Issue
Block a user