Fix bug #2855: PDB (doc) metadata fixes.

This commit is contained in:
John Schember 2009-07-18 11:24:03 -04:00
parent 49e1467887
commit 1b63ec3bbc
2 changed files with 2 additions and 2 deletions

View File

@ -51,5 +51,5 @@ def set_metadata(stream, mi):
MetadataWriter(stream, mi)
stream.seek(0)
stream.write(re.sub('[^-A-Za-z0-9]+', '_', mi.title).ljust(32, '\x00')[:32])
stream.write('%s\x00' % re.sub('[^-A-Za-z0-9 ]+', '_', mi.title).ljust(31, '\x00')[:31].encode('ascii', 'replace'))

View File

@ -30,7 +30,7 @@ class PdbHeaderReader(object):
def name(self):
self.stream.seek(0)
return re.sub('[^-A-Za-z0-9 ]+', '', self.stream.read(32).replace('\x00', ''))
return self.stream.read(32).replace('\x00', '')
def full_section_info(self, number):
if number not in range(0, self.num_sections):