mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
Fix: TC_NetWorkBuffer getBuffers bug cause crash
This commit is contained in:
parent
b5d993ccb9
commit
8c07b157ce
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user