From 895cd0792c17e470b89f5d7a40783d9917515604 Mon Sep 17 00:00:00 2001 From: Thomas Stoddard Date: Thu, 2 Oct 2025 14:12:15 +0000 Subject: [PATCH] Communication: I2C: Fix invalid packet logic --- communication/packet/i2cpacket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communication/packet/i2cpacket.cpp b/communication/packet/i2cpacket.cpp index 4d0d262..5151bbf 100644 --- a/communication/packet/i2cpacket.cpp +++ b/communication/packet/i2cpacket.cpp @@ -49,7 +49,7 @@ namespace icsneo report(APIEvent::Type::I2CMessageExceedsMaxLength, APIEvent::Severity::Error); return false; } - if(message.controlBytes.empty() || message.dataBytes.empty()) + if(message.controlBytes.empty() && message.dataBytes.empty()) { //You'll need to provide a target R/W register in controlBytes //alternatively, you're expecting to read without providing a dataBytes payload