MCPcopy Create free account
hub / github.com/cppla/ServerStatus / str_sanitize

Function str_sanitize

server/src/system.c:1619–1628  ·  view source on GitHub ↗

makes sure that the string only contains the characters between 32 and 255 + \r\n\t */

Source from the content-addressed store, hash-verified

1617
1618/* makes sure that the string only contains the characters between 32 and 255 + \r\n\t */
1619void str_sanitize(char *str_in)
1620{
1621 unsigned char *str = (unsigned char *)str_in;
1622 while(*str)
1623 {
1624 if(*str < 32 && !(*str == '\r') && !(*str == '\n') && !(*str == '\t'))
1625 *str = ' ';
1626 str++;
1627 }
1628}
1629
1630char *str_skip_to_whitespace(char *str)
1631{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected