Fix: TC_NetWorkBuffer getBuffers bug cause crash

This commit is contained in:
DevilIsY 2022-05-25 23:06:03 +08:00
parent b5d993ccb9
commit 8c07b157ce

View File

@ -405,20 +405,21 @@ string TC_NetWorkBuffer::getBuffersString() const
{
string buffer;
buffer.resize(_length);
getBuffers(&buffer[0], _length);
if (_length > 0)
{
getBuffers(&buffer[0], _length);
}
return buffer;
}
vector<char> TC_NetWorkBuffer::getBuffers() const
{
vector<char> buffer;
buffer.resize(_length);
getBuffers(&buffer[0], _length);
if (_length > 0)
{
getBuffers(&buffer[0], _length);
}
return buffer;
}