Merge upstream/dev (10 commits) [upstream-sync]
This commit is contained in:
commit
9d02e2870d
21 files changed
+123
-33
No files matched your search
@@ -1199,7 +1199,9 @@ void MyMesh::handleCmdFrame(size_t len) {
|
||||
? ERR_CODE_NOT_FOUND
|
||||
: ERR_CODE_UNSUPPORTED_CMD); // unknown recipient, or unsupported TXT_TYPE_*
|
||||
}
|
||||
} else if (cmd_frame[0] == CMD_SEND_CHANNEL_TXT_MSG) { // send GroupChannel text msg
|
||||
} else if (cmd_frame[0] == CMD_SEND_CHANNEL_TXT_MSG && len >= 7) { // send GroupChannel text msg
|
||||
// 7 = code, txt_type, channel_idx and the 4 byte timestamp; the text may be empty.
|
||||
// Without this the text length below is computed as len - 7 and turns negative.
|
||||
int i = 1;
|
||||
uint8_t txt_type = cmd_frame[i++]; // should be TXT_TYPE_PLAIN
|
||||
uint8_t channel_idx = cmd_frame[i++];
|
||||
|
||||
Reference in new issue
Block a user