Skip to content

Commit f18dc68

Browse files
committed
Weird fix for s2gs parsing. Seems to work?
1 parent 6c53b14 commit f18dc68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sc2reader/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ def read_data_struct(self, indent=0, key=None):
296296
#to have no effect and kicks back the next instruction
297297
flag = self.read_byte()
298298
if debug: print prefix
299-
data = self.read_data_struct(indent,key)
299+
if self.peek(2).encode('hex')!='0404':
300+
data = self.read_data_struct(indent,key)
301+
else:
302+
data = 0
300303

301304
elif datatype == 0x04:
302305
#0x04 is an unknown data type where the first byte of information

0 commit comments

Comments
 (0)