From 909f82a22883e3f45ec64d8206802bbce5bad9bf Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 15 Nov 2003 10:30:30 +0000 Subject: some support for ah-hoc networks essid-based configuration git-svn-id: file:///home/lennart/svn/public/waproamd/trunk@45 022f378f-78c4-0310-b860-d162c87e6274 --- src/util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index b6d4e14..caedd89 100644 --- a/src/util.c +++ b/src/util.c @@ -164,12 +164,13 @@ const char* escape_essid(const char *s) { for (i = s, o = output; i-s < IW_ESSID_MAX_SIZE && *i; i++) { - if (*i >= 32 && *i < 126 && *i != '/' && *i != '%') { + if (*i >= 32 && *i < 126 && *i != '/' && *i != '%') + *(o++) = *i; + else { *(o++) = '%'; *(o++) = hextab[*i >> 4]; *(o++) = hextab[*i & 0xF]; - } else - *(o++) = *i; + } } *(o++) = 0; -- cgit