Prechádzať zdrojové kódy

conditions are hard

Chris Mullins 8 rokov pred
rodič
commit
512720dfcf
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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 {