mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Device: Fix getRTC response size
Some devices pad to 16-bit.
This commit is contained in:
+1
-1
@@ -1951,7 +1951,7 @@ bool Device::setRTC(const std::chrono::time_point<std::chrono::system_clock>& ti
|
||||
}
|
||||
|
||||
auto m51msg = std::dynamic_pointer_cast<Main51Message>(generic);
|
||||
if(!m51msg || m51msg->data.size() != 1) {
|
||||
if(!m51msg || m51msg->data.empty() || m51msg->data.size() > 2) {
|
||||
report(APIEvent::Type::MessageFormattingError, APIEvent::Severity::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user