Skip to content

Commit 2f2ac91

Browse files
committed
Replace seek n' peek with read_range.
1 parent 84a82ef commit 2f2ac91

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sc2reader/scripts/sc2parse.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ def main():
6767
print '[ERROR]', e.message
6868
for event in e.game_events[-5:]:
6969
print '{0} - {1}'.format(hex(event.type),event.bytes.encode('hex'))
70-
e.buffer.seek(e.location)
71-
print e.buffer.peek(50).encode('hex')
70+
print e.buffer.read_range(e.location, e.location+50).encode('hex')
7271
print
7372
except Exception as e:
7473
print

0 commit comments

Comments
 (0)