ソースを参照

conditions are hard

Chris Mullins 8 年 前
コミット
512720dfcf
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  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 {