diff options
author | Andrew Eikum <aeikum@codeweavers.com> | 2018-08-24 21:48:57 +0300 |
---|---|---|
committer | Andrew Eikum <aeikum@codeweavers.com> | 2018-08-24 21:48:57 +0300 |
commit | e7c4d12f8d2353b789ab3487016349f097169a36 (patch) | |
tree | 0d3190daa77865514bb72d7cc9248b72e9fca678 | |
parent | 94288570775bde5265a21e14425caf43a16c2fa6 (diff) |
proton: Fix byte string comparisonproton-3.7beta-20180824
-rwxr-xr-x | proton | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -342,7 +342,7 @@ def determine_architecture(path): try: with open(path, "rb") as f: magic = f.read(2) - if magic != "MZ": + if magic != b"MZ": return ARCH_UNKNOWN f.seek(0x18) reloc = struct.unpack('<H', f.read(2))[0] @@ -353,7 +353,7 @@ def determine_architecture(path): pe_offs = struct.unpack('<L', f.read(4))[0] f.seek(pe_offs) magic = f.read(4) - if magic != "PE\0\0": + if magic != b"PE\0\0": return ARCH_UNKNOWN f.seek(pe_offs + 4) arch = struct.unpack('<H', f.read(2))[0] |