Merge pull request #13 from schwert/renpy8

Allows unpacking renpy 8 archives
This commit is contained in:
Shiz 2022-08-23 20:18:58 +02:00 committed by GitHub
commit bb0cf19f04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,10 @@ if sys.version_info[0] >= 3:
return text return text
def _unmangle(data): def _unmangle(data):
return data.encode('latin1') if type(data) == bytes:
return data
else:
return data.encode('latin1')
def _unpickle(data): def _unpickle(data):
# Specify latin1 encoding to prevent raw byte values from causing an ASCII decode error. # Specify latin1 encoding to prevent raw byte values from causing an ASCII decode error.