X Tutup
Skip to content

Commit 6a19119

Browse files
committed
Replace NUL bytes in Repl.echo(). This will close issue #53.
1 parent 5eb009f commit 6a19119

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bpython/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,8 @@ def echo(self, s, redraw=True):
13701370
a = a | curses.A_BOLD
13711371
s = s.replace('\x03', '')
13721372
s = s.replace('\x01', '')
1373+
# Replace NUL bytes, as addstr raises an exception otherwise
1374+
s = s.replace('\x00', '')
13731375

13741376

13751377
self.scr.addstr(s, a)

0 commit comments

Comments
 (0)
X Tutup