Skip to content

Commit

Permalink
Merge pull request #71 from alpyen/fix-zero-length-payload-detection
Browse files Browse the repository at this point in the history
Fix detection of zero payload length packets
  • Loading branch information
PowerBroker2 authored Jan 19, 2024
2 parents 7406763 + 44e353d commit ccedcec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pySerialTransfer/pySerialTransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def available(self):
self.state = find_payload_len

elif self.state == find_payload_len:
if recChar <= MAX_PACKET_SIZE:
if recChar > 0 and recChar <= MAX_PACKET_SIZE:
self.bytesToRec = recChar
self.payIndex = 0
self.state = find_payload
Expand Down

0 comments on commit ccedcec

Please sign in to comment.