Skip to content
Permalink
Browse files

fix endless loop caused by fragmentation

  • Loading branch information...
jabdoa2 committed Jul 20, 2019
1 parent 25dfc7c commit 42d893f93f95c87f54c8c2ec7aed07de02533740
Showing with 6 additions and 0 deletions.
  1. +6 −0 mpf/platforms/opp/opp_serial_communicator.py
@@ -177,13 +177,19 @@ def _parse_msg(self, msg):
message_found += 1
self.partMsg = self.partMsg[7:]
strlen -= 7
else:
# message not complete yet
break
# Check if read matrix input
elif self.partMsg[1] == ord(OppRs232Intf.READ_MATRIX_INP):
if strlen >= 11:
self.platform.process_received_message(self.chain_serial, self.partMsg[:11])
message_found += 1
self.partMsg = self.partMsg[11:]
strlen -= 11
else:
# message not complete yet
break
else:
# Lost synch
self.partMsg = self.partMsg[2:]

0 comments on commit 42d893f

Please sign in to comment.
You can’t perform that action at this time.