String message length
-
In MyMessage.c is length of string message incorrect for longer messages. Right now is:
MyMessage& MyMessage::set(const char* value) {
uint8_t length = strlen(value);
miSetLength(length);
miSetPayloadType(P_STRING);
strncpy(data, value, min(length, MAX_PAYLOAD));
return *this;
}Correct calculation of length is:
MyMessage& MyMessage::set(const char* value) {
** uint8_t length = min(strlen(value), MAX_PAYLOAD);**
miSetLength(length);
miSetPayloadType(P_STRING);
** strncpy(data, value, length);**
return *this;
}I have problems in EasyIoT server if gw.sendSketchInfo text is longer than 24 characters. I've added additional checks but it's right to fix problem at source.
-