Pārlūkot izejas kodu

conditions are hard

Chris Mullins 8 gadi atpakaļ
vecāks
revīzija
512720dfcf
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/MiLight/MiLightUdpServer.cpp

+ 1 - 1
lib/MiLight/MiLightUdpServer.cpp

@@ -23,7 +23,7 @@ void MiLightUdpServer::handleClient() {
   const size_t packetSize = socket.parsePacket();
   
   if (packetSize) {
-    if (packetSize < 2 || packetSize > 3) {
+    if (packetSize >= 2 && packetSize <= 3) {
       socket.read(packetBuffer, packetSize);
       handleCommand(packetBuffer[0], packetBuffer[1]);
     } else {