mirror of
https://github.com/elliotnunn/macresources.git
synced 2024-12-12 18:30:08 +00:00
Fix an old bug in the Python BinHex code
This commit is contained in:
parent
d121980787
commit
87f98af7e1
@ -164,12 +164,12 @@ class BinHex:
|
||||
nl = len(name)
|
||||
if nl > 63:
|
||||
raise Error('Filename too long')
|
||||
d = bytes([nl]) + name.encode("latin-1") + b'\0'
|
||||
d = bytes([nl]) + name.encode("mac_roman") + b'\0'
|
||||
tp, cr = finfo.Type, finfo.Creator
|
||||
if isinstance(tp, str):
|
||||
tp = tp.encode("latin-1")
|
||||
tp = tp.encode("mac_roman")
|
||||
if isinstance(cr, str):
|
||||
cr = cr.encode("latin-1")
|
||||
cr = cr.encode("mac_roman")
|
||||
d2 = tp + cr
|
||||
|
||||
# Force all structs to be packed with big-endian
|
||||
|
Loading…
Reference in New Issue
Block a user