Skip to content

Commit

Permalink
logging empty packets now works correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
imxeno committed Nov 10, 2020
1 parent baa162c commit 483883f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DevTale/Protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ namespace devtale

void __stdcall Protocol::onPacketSend(char* packet)
{
const std::string ps(packet);
get()->handler_->onPacketSend(packet);
const std::string ps(packet != nullptr ? packet : "");
get()->handler_->onPacketSend(ps);
}

void __stdcall Protocol::onPacketReceive(char* packet)
{
const std::string ps(packet);
get()->handler_->onPacketReceive(packet);
const std::string ps(packet != nullptr ? packet : "");
get()->handler_->onPacketReceive(ps);
}

void Protocol::send(char* packet) const
Expand Down

0 comments on commit 483883f

Please sign in to comment.