Fixed net_nop causing empty lines in output

This commit is contained in:
Jordan Cristiano 2015-05-15 01:03:59 -04:00
parent 063c2f515c
commit 2e8c0a742f
1 changed files with 6 additions and 3 deletions

View File

@ -58,7 +58,10 @@ void ConLogWriter::WriteNetPacket(NetPacket& packet)
{ {
std::ostringstream ss; std::ostringstream ss;
NetHandlers::NetMsg_ToString(packet.type, ss, packet.data); NetHandlers::NetMsg_ToString(packet.type, ss, packet.data);
ss << "\n"; if (ss.tellp() > 0)
fputs(ss.str().c_str(), m_outputFp); {
std::clog << ss.str(); ss << "\n";
fputs(ss.str().c_str(), m_outputFp);
std::clog << ss.str();
}
} }