Fix cases where a bytearray doesn't work in place of bytes

pull/133/head
Tim Bell 2018-04-03 07:27:29 +10:00
parent 185ddeb2ab
commit 083f11b165
1 changed files with 1 additions and 0 deletions

View File

@ -120,6 +120,7 @@ class PDFParser(PSStackParser):
objlen += len(line) objlen += len(line)
if self.fallback: if self.fallback:
data += line data += line
data = bytes(data)
self.seek(pos+objlen) self.seek(pos+objlen)
# XXX limit objlen not to exceed object boundary # XXX limit objlen not to exceed object boundary
log.debug('Stream: pos=%d, objlen=%d, dic=%r, data=%r...', pos, objlen, dic, data[:10]) log.debug('Stream: pos=%d, objlen=%d, dic=%r, data=%r...', pos, objlen, dic, data[:10])