1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

dist/tools/tunslip6: Do not accept null chars as printable

This commit is contained in:
Joakim Nohlgård 2016-07-23 10:06:27 +02:00
parent 1c5b26c038
commit 9b8485f21e

View File

@ -158,7 +158,7 @@ is_sensible_string(const unsigned char *s, size_t len)
int ret = 0;
for (size_t i = 0; i < len; i++) {
if (s[i] == 0 || s[i] == '\r' || s[i] == '\n' || s[i] == '\t') {
if (s[i] == '\r' || s[i] == '\n' || s[i] == '\t') {
continue;
}
else if (s[i] < ' ' || '~' < s[i]) {