diff --git a/bincopy.py b/bincopy.py index b217e74..5730a3b 100755 --- a/bincopy.py +++ b/bincopy.py @@ -5,7 +5,7 @@ import copy import binascii -import string +import string,re import sys import argparse from collections import namedtuple @@ -841,6 +841,7 @@ def add(self, data, overwrite=False): if is_srec(data): self.add_srec(data, overwrite) elif is_ihex(data): + data = re.sub('[^\x20-\x7E]','',data) self.add_ihex(data, overwrite) elif is_ti_txt(data): self.add_ti_txt(data, overwrite)