Skip to content

Commit ed15354

Browse files
VeritasimoGraylinKim
authored andcommitted
Fix Map resources not loading correctly
1 parent 5276fa6 commit ed15354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sc2reader/resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def load_details(self):
161161
initData = self.raw_data['replay.initData']
162162
if initData.map_data:
163163
self.gateway = initData.map_data[0].gateway
164-
self.map_hash = initData.map_data[-1].map_hash
164+
self.map_hash = initData.map_data[-1].map_hash.encode("hex")
165165

166166
#Expand this special case mapping
167167
if self.gateway == 'sg':
@@ -375,7 +375,7 @@ def __init__(self, map_file, filename=None, gateway=None, map_hash=None, **optio
375375
self.hash = map_hash
376376
self.gateway = gateway
377377
self.url = Map.get_url(gateway, map_hash)
378-
self.archive = MPQArchive(StringIO(self.file))
378+
self.archive = MPQArchive(StringIO(map_file))
379379
self.minimap = self.archive.read_file('Minimap.tga')
380380

381381
@staticmethod

0 commit comments

Comments
 (0)