mirror of
https://github.com/nasa/trick.git
synced 2025-06-17 22:58:25 +00:00
* Replace sprintf with snprintf in all of Trick source. #1384 * Don't add -Werror for MacOS because of deprecated sprintf warnings which we cant get rid of because SWIG. #1384 * Fixed an unbalanced parenthesis in S_overrides.mk. #1384
This commit is contained in:
@ -148,7 +148,7 @@ void TimeSession::sendMessage() {
|
||||
int month = theTime->tm_mon + 1;
|
||||
int year = theTime->tm_year + 1900;
|
||||
|
||||
sprintf(message, "Time: %02d:%02d:%02d Date: %02d/%02d/%d\n", hours, minutes, seconds, month, day, year);
|
||||
snprintf(message, sizeof(message), "Time: %02d:%02d:%02d Date: %02d/%02d/%d\n", hours, minutes, seconds, month, day, year);
|
||||
mg_websocket_write(connection, MG_WEBSOCKET_OPCODE_TEXT, message, strlen(message));
|
||||
}
|
||||
|
||||
@ -270,4 +270,4 @@ To test your new web socket interface, put the following ```time.html``` file in
|
||||
</html>
|
||||
```
|
||||
|
||||
Continue to [Simulation Utilities](../simulation_utilities/Simulation-Utilities)
|
||||
Continue to [Simulation Utilities](../simulation_utilities/Simulation-Utilities)
|
||||
|
Reference in New Issue
Block a user