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

Function str_sanitize_strong

server/src/system.c:1594–1604  ·  view source on GitHub ↗

makes sure that the string only contains the characters between 32 and 127 */

Source from the content-addressed store, hash-verified

1592
1593/* makes sure that the string only contains the characters between 32 and 127 */
1594void str_sanitize_strong(char *str_in)
1595{
1596 unsigned char *str = (unsigned char *)str_in;
1597 while(*str)
1598 {
1599 *str &= 0x7f;
1600 if(*str < 32)
1601 *str = 32;
1602 str++;
1603 }
1604}
1605
1606/* makes sure that the string only contains the characters between 32 and 255 */
1607void str_sanitize_cc(char *str_in)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected