From 32da05b3ecdebb0f2ff34ed7cf47763a95c644d3 Mon Sep 17 00:00:00 2001 From: McNova Date: Wed, 13 Jul 2022 21:00:07 -0400 Subject: [PATCH] Check that a packet start with PROTO::MAGIC (#80) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Christian Vallières --- hid/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hid/src/main.cpp b/hid/src/main.cpp index 00716667..eb8ee809 100644 --- a/hid/src/main.cpp +++ b/hid/src/main.cpp @@ -334,7 +334,7 @@ int main() { if (index == 7) { _sendResponse(_handleRequest(buffer)); index = 0; - } else { + } else if (buffer[0] == PROTO::MAGIC) { last = micros(); ++index; }