Skip to content

Commit

Permalink
Improve port detection
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler authored Jul 1, 2024
1 parent 53e667a commit 4007e6a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mtkclient/Library/Port.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ def run_handshake(self):
try:
while i < length:
if ep_out(int.to_bytes(startcmd[i], 1, 'little')):
v = ep_in(maxinsize)
if len(v) == 1 and v[0] == ~(startcmd[i]) & 0xFF:
if ep_in(maxinsize)[-1] == ~(startcmd[i]) & 0xFF:
i += 1
else:
i = 0
Expand Down

0 comments on commit 4007e6a

Please sign in to comment.