mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
Clear buffer (if any). Avoids false-positives with memcheck if buffer
contains old data
This commit is contained in:
@ -77,6 +77,7 @@ void CConnection::sendPack(const CPack * pack)
|
||||
if (!connectionPtr)
|
||||
throw std::runtime_error("Attempt to send packet on a closed connection!");
|
||||
|
||||
packWriter->buffer.clear();
|
||||
*serializer & pack;
|
||||
|
||||
logNetwork->trace("Sending a pack of type %s", typeid(*pack).name());
|
||||
|
Reference in New Issue
Block a user