]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Apply another fix to 'X' format handling.
authorTed Lemon <source@isc.org>
Wed, 28 Apr 1999 14:58:54 +0000 (14:58 +0000)
committerTed Lemon <source@isc.org>
Wed, 28 Apr 1999 14:58:54 +0000 (14:58 +0000)
common/options.c

index 1f36eba899b8d40cf124c9abcf354afd937fd400..d93c1a8221a03a63104bdab0736304a9f9ea1383 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: options.c,v 1.26.2.8 1999/04/28 13:27:32 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: options.c,v 1.26.2.9 1999/04/28 14:58:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #define DHCP_OPTION_DATA
@@ -477,14 +477,16 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes)
                                    !isprint (data [k]))
                                        break;
                        }
-                       if (k == len)
+                       if (k == len) {
+                               --numelem;
                                fmtbuf [i] = 't';
-                       else
+                       } else {
                                fmtbuf [i] = 'x';
+                               hunksize++;
+                               comma = ':';
+                       }
                        fmtbuf [i + 1] = 0;
-                       hunksize++;
                        numhunk = 0;
-                       comma = ':';
                        break;
                      case 't':
                        fmtbuf [i] = 't';