Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Eikum <aeikum@codeweavers.com>2018-08-24 21:48:57 +0300
committerAndrew Eikum <aeikum@codeweavers.com>2018-08-24 21:48:57 +0300
commite7c4d12f8d2353b789ab3487016349f097169a36 (patch)
tree0d3190daa77865514bb72d7cc9248b72e9fca678
parent94288570775bde5265a21e14425caf43a16c2fa6 (diff)
proton: Fix byte string comparisonproton-3.7beta-20180824
-rwxr-xr-xproton4
1 files changed, 2 insertions, 2 deletions
diff --git a/proton b/proton
index cb771e6b..683a76b9 100755
--- a/proton
+++ b/proton
@@ -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]