Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2017-01-09 18:37:52 +0000
committerGitHub2017-01-09 18:37:52 +0000
commit5b00fd40ba9dc026ce467409cb7b77015eb0f40c (patch)
treebc5d0b0cd22b6b03814d55443f27a0d32ae12861 /include
parent7bb3e859aaedd70e8860a1089d91f6bfdab6b847 (diff)
parent8d16d95a995708d52f5ab19c0124b197eb4b7210 (diff)
downloadcatch3-5b00fd40ba9dc026ce467409cb7b77015eb0f40c.tar.gz
Merge pull request #767 from hmich/xml-encoder-extended-ascii
Do not encode extended ASCII characters in XML reporter
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_xmlwriter.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/internal/catch_xmlwriter.hpp b/include/internal/catch_xmlwriter.hpp
index 97890d2f..c181e10e 100644
--- a/include/internal/catch_xmlwriter.hpp
+++ b/include/internal/catch_xmlwriter.hpp
@@ -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;