From 92bf28965b067a071172559844746cce537a31fe Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 26 May 2014 18:01:48 +0200 Subject: [PATCH] Fix for '<' in strings. --- alethzero/MainWin.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index a58ac566f..2a9282861 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -86,8 +86,14 @@ string htmlDump(bytes const& _b, unsigned _w = 8) for (unsigned j = i; j < i + _w; ++j) if (j < _b.size()) if (_b[j] >= 32 && _b[j] < 128) - ret << (char)_b[j]; - else ret << '?'; + if ((char)_b[j] == '<') + ret << "<"; + else if ((char)_b[j] == '&') + ret << "&"; + else + ret << (char)_b[j]; + else + ret << '?'; else ret << ' '; ret << " "; @@ -96,6 +102,7 @@ string htmlDump(bytes const& _b, unsigned _w = 8) ret << "\n"; } ret << ""; + cdebug << ret.str(); return ret.str(); }