Permalink
Browse files

Fixes #578 (#579)

It turned out we failed when there were unicode characters in a file.
  • Loading branch information...
disconnect3d committed Nov 27, 2018
1 parent df32e12 commit 054f2090488d73c601b17e2eb198c886bd6a4b01
Showing with 2 additions and 1 deletion.
  1. +2 −1 pwndbg/commands/context.py
@@ -8,6 +8,7 @@
import ast
import codecs
import sys
from io import open
import gdb
@@ -194,7 +195,7 @@ def context_disasm():
@pwndbg.memoize.reset_on_start
def get_highlight_source(filename):
# Notice that the code is cached
with open(filename) as f:
with open(filename, encoding='utf-8') as f:
source = f.read()
if pwndbg.config.syntax_highlight:

0 comments on commit 054f209

Please sign in to comment.