ignore non utf-8 characters in the source code

pull/1003/head
Lonny Wong 4 years ago committed by Disconnect3d
parent 136b3b6a80
commit a6d4da9d23

@ -459,7 +459,7 @@ theme.Parameter('code-prefix', '►', "prefix marker for 'context code' command"
@pwndbg.memoize.reset_on_start
def get_highlight_source(filename):
# Notice that the code is cached
with open(filename, encoding='utf-8') as f:
with open(filename, encoding='utf-8', errors='ignore') as f:
source = f.read()
if pwndbg.config.syntax_highlight:

Loading…
Cancel
Save