From 2e8c0a742f4288496ceea53ca49d42cdaac5ef67 Mon Sep 17 00:00:00 2001 From: Jordan Cristiano Date: Fri, 15 May 2015 01:03:59 -0400 Subject: [PATCH] Fixed net_nop causing empty lines in output --- demboyz/conlogwriter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/demboyz/conlogwriter.cpp b/demboyz/conlogwriter.cpp index cbf1659..c22ee59 100644 --- a/demboyz/conlogwriter.cpp +++ b/demboyz/conlogwriter.cpp @@ -58,7 +58,10 @@ void ConLogWriter::WriteNetPacket(NetPacket& packet) { std::ostringstream ss; NetHandlers::NetMsg_ToString(packet.type, ss, packet.data); - ss << "\n"; - fputs(ss.str().c_str(), m_outputFp); - std::clog << ss.str(); + if (ss.tellp() > 0) + { + ss << "\n"; + fputs(ss.str().c_str(), m_outputFp); + std::clog << ss.str(); + } }