avoid DEBUG duplicate newline

This commit is contained in:
Geoff McLane 2016-04-03 17:54:46 +02:00
parent 3e5e07ea18
commit 7598fdfff2
1 changed files with 10 additions and 1 deletions

View File

@ -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
}