Core/Misc: Fixed issues found by coverity

CID 1374575, 1374574, 1374573, 1374572, 1374563, 1374556
This commit is contained in:
Shauren
2017-04-26 18:01:50 +02:00
parent 65eefebe43
commit 2f859ffd2e
8 changed files with 14 additions and 18 deletions

View File

@@ -604,8 +604,8 @@ class TC_SHARED_API ByteBuffer
void append(const ByteBuffer& buffer)
{
if (buffer.wpos())
append(buffer.contents(), buffer.wpos());
if (!buffer.empty())
append(buffer.contents(), buffer.size());
}
// can be used in SMSG_MONSTER_MOVE opcode