mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 17:26:05 +01:00
Don't read invalid data from title in PDB header.
This commit is contained in:
parent
a6886b0acd
commit
6e600b0e56
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ def section_count(self):
|
|||
|
||||
def name(self):
|
||||
self.stream.seek(0)
|
||||
return self.stream.read(32).replace('\x00', '')
|
||||
return re.sub('[^-A-Za-z0-9 ]+', '_', self.stream.read(32).replace('\x00', ''))
|
||||
|
||||
def full_section_info(self, number):
|
||||
if number not in range(0, self.num_sections):
|
||||
|
|
|
|||
Loading…
Reference in a new issue