summaryrefslogtreecommitdiff
path: root/lib/common/DebugPrintf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/DebugPrintf.cpp')
-rwxr-xr-xlib/common/DebugPrintf.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common/DebugPrintf.cpp b/lib/common/DebugPrintf.cpp
index 02c25496..d07604b7 100755
--- a/lib/common/DebugPrintf.cpp
+++ b/lib/common/DebugPrintf.cpp
@@ -55,10 +55,16 @@ int BoxDebugTrace(const char *format, ...)
// But tracing to syslog is independent of tracing being on or not
if(BoxDebugTraceToSyslog)
{
+#ifdef WIN32
// Remove trailing '\n', if it's there
+ if(r > 0 && text[r-1] == '\n')
+ {
+ text[r-1] = '\0';
+#else
if(r > 0 && text[r] == '\n')
{
text[r] = '\0';
+#endif
--r;
}
// Log it