From: Roy Marples Date: Tue, 1 Sep 2009 20:37:34 +0000 (+0000) Subject: Fix parsing of escape codes. X-Git-Tag: v5.1.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=857576b48d46e9ce9c4dde098cd94d506bbdd581;p=thirdparty%2Fdhcpcd.git Fix parsing of escape codes. --- diff --git a/if-options.c b/if-options.c index 7415bebd..65e8b5db 100644 --- a/if-options.c +++ b/if-options.c @@ -203,20 +203,24 @@ parse_string_hwaddr(char *sbuf, ssize_t slen, const char *str, int clid) } if (*str == '\\') { str++; - switch(*str++) { + switch(*str) { case '\0': break; case 'b': *sbuf++ = '\b'; + str++; break; case 'n': *sbuf++ = '\n'; + str++; break; case 'r': *sbuf++ = '\r'; + str++; break; case 't': *sbuf++ = '\t'; + str++; break; case 'x': /* Grab a hex code */