mirror of
https://github.com/pelgraine/Meck.git
synced 2026-11-06 13:22:31 +01:00
fix ble send message buffer handling
This commit is contained in:
1 parent
d76fa04613
commit
5cc9feb3e9
1 file changed
+2
@@ -1183,6 +1183,8 @@ void MyMesh::handleCmdFrame(size_t len) {
|
||||
memcpy(&msg_timestamp, &cmd_frame[i], 4);
|
||||
i += 4;
|
||||
const char *text = (char *)&cmd_frame[i];
|
||||
int text_len = len - i;
|
||||
cmd_frame[len] = '\0'; // Null-terminate for C string use
|
||||
|
||||
if (txt_type != TXT_TYPE_PLAIN) {
|
||||
writeErrFrame(ERR_CODE_UNSUPPORTED_CMD);
|
||||
|
||||
Reference in new issue
Block a user