소스 검색

correct boundary

Christopher Mullins 8 년 전
부모
커밋
fc89ce4eac
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/MiLight/PacketFormatter.cpp

+ 1 - 1
lib/MiLight/PacketFormatter.cpp

@@ -117,7 +117,7 @@ void PacketFormatter::pushPacket() {
   }
 
   // Make sure there's enough buffer to add another packet.
-  if ((currentPacket + packetLength) > PACKET_BUFFER + PACKET_FORMATTER_BUFFER_SIZE) {
+  if ((currentPacket + packetLength) >= PACKET_BUFFER + PACKET_FORMATTER_BUFFER_SIZE) {
     Serial.println(F("ERROR: packet buffer full!  Cannot buffer a new packet.  THIS IS A BUG!"));
     return;
   }