From 7598fdfff238e02d41706e6f264243dae3f54fcd Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sun, 3 Apr 2016 17:54:46 +0200 Subject: [PATCH] avoid DEBUG duplicate newline --- src/fileio.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index f2e11e7..31c4d5b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -87,7 +87,16 @@ void TIDY_CALL TY_(filesink_putByte)( void* sinkData, byte bv ) fputc( bv, fout ); #if !defined(NDEBUG) && defined(_MSC_VER) if (_fileno(fout) != 2) - SPRTF("%c",bv); + { + if (bv != 0x0d) + { + /*\ + * avoid duplicate newline - SPRTF will translate an 0x0d to CRLF, + * and do the same with the following 0x0a + \*/ + SPRTF("%c",bv); + } + } #endif }