Commit c8ef5327916e354f0e657a6b87e78ee2966cbfe5

Authored by decalage2
1 parent b747e4b0

ezhexviewer: fixed issue #151 to display control chars correctly

Showing 1 changed file with 3 additions and 2 deletions
oletools/ezhexviewer.py
... ... @@ -46,8 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 46 # 2012-10-04 v0.02 PL: - added license
47 47 # 2016-09-06 v0.50 PL: - added main function for entry points in setup.py
48 48 # 2016-10-26 PL: - fixed to run on Python 2+3
  49 +# 2017-03-23 v0.51 PL: - fixed display of control characters (issue #151)
49 50  
50   -__version__ = '0.50'
  51 +__version__ = '0.51'
51 52  
52 53 #------------------------------------------------------------------------------
53 54 # TODO:
... ... @@ -106,7 +107,7 @@ def bchr(x):
106 107 # PSF license: http://docs.python.org/license.html
107 108 # Copyright (c) 2001-2012 Python Software Foundation; All Rights Reserved
108 109  
109   -FILTER = b''.join([(len(repr(bchr(x)))<=4 and x != 0x0A) and bchr(x) or b'.' for x in range(256)])
  110 +FILTER = b''.join([(len(repr(bchr(x)))<=4 and x>=0x20) and bchr(x) or b'.' for x in range(256)])
110 111  
111 112 def hexdump3(src, length=8, startindex=0):
112 113 """
... ...