Do not encode extended ASCII characters in XML reporter

This commit is contained in:
Igor Akhmetov 2016-12-26 11:39:19 +00:00
parent 2be372710e
commit 8d16d95a99

View File

@ -57,7 +57,7 @@ namespace Catch {
default:
// Escape control chars - based on contribution by @espenalb in PR #465 and
// by @mrpi PR #588
if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' )
if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' )
os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>( c ) << ';';
else
os << c;