diff --git a/oletools/rtfobj.py b/oletools/rtfobj.py index 4f2259a..0878bd4 100644 --- a/oletools/rtfobj.py +++ b/oletools/rtfobj.py @@ -578,7 +578,7 @@ class RtfParser(object): # it should be treated as a null length: binlen=0 # ignore optional space after \bin - if self.data[self.index] == ord(' '): + if ord(self.data[self.index:self.index + 1]) == ord(' '): log.debug('\\bin: ignoring whitespace before data') self.index += 1 log.debug('\\bin: reading %d bytes of binary data' % binlen)