mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
Switch from dynamic std::string storage to fixed-size char[]
This commit is contained in:
@@ -1062,7 +1062,7 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha
|
||||
|
||||
sm.sender = nodeDB->getNodeNum(); // us
|
||||
sm.channelIndex = channel;
|
||||
sm.text = std::string(message).substr(0, MAX_MESSAGE_SIZE - 1);
|
||||
strncpy(sm.text, message, MAX_MESSAGE_SIZE - 1);
|
||||
sm.text[MAX_MESSAGE_SIZE - 1] = '\0';
|
||||
|
||||
// Classify broadcast vs DM
|
||||
|
||||
Reference in New Issue
Block a user