浏览代码

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;
   }