]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix parsing of escape codes.
authorRoy Marples <roy@marples.name>
Tue, 1 Sep 2009 20:39:31 +0000 (20:39 +0000)
committerRoy Marples <roy@marples.name>
Tue, 1 Sep 2009 20:39:31 +0000 (20:39 +0000)
if-options.c

index 7415bebd71d206f651f141255b027f30f66911c1..65e8b5db1f4bd55d14d51df51d08941d7a31494c 100644 (file)
@@ -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 */