From c71a56b0ccff35c0f05ee453eaf941c1d20e3613 Mon Sep 17 00:00:00 2001 From: TheRo0T Date: Sat, 12 Nov 2016 03:26:46 +0400 Subject: [PATCH] Fix to cover win32 canhacker bug: in some situation C command have extra up to 6 bytes --- CanHacker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CanHacker.cpp b/CanHacker.cpp index 11ef1a9..d27bb59 100644 --- a/CanHacker.cpp +++ b/CanHacker.cpp @@ -615,7 +615,7 @@ CanHacker::ERROR CanHacker::receiveTimestampCommand(const char *buffer, const in CanHacker::ERROR CanHacker::receiveCloseCommand(const char *buffer, const int length) { writeDebugStream(F("receiveCloseCommand\n")); - if (length != 1) { + if (length < 1) { return ERROR_INVALID_COMMAND; }