]> git.sur5r.net Git - openldap/blobdiff - libraries/liblber/etest.c
Fix 't' tag option
[openldap] / libraries / liblber / etest.c
index 33184ecc5c2bf8f8512a491c0e8142d0b77dec5c..3731a24a467eb07cff02468a2df80f37e00744f2 100644 (file)
@@ -64,6 +64,7 @@ int
 main( int argc, char **argv )
 {
        char    *s;
+       int tag;
 
        int                     fd, rc;
        BerElement      *ber;
@@ -143,10 +144,14 @@ main( int argc, char **argv )
                        break;
 
                case 's':       /* string */
-               case 't':       /* tag for the next element */
                        buf = getbuf();
                        rc = ber_printf( ber, fmt, buf );
                        break;
+               case 't':       /* tag for the next element */
+                       buf = getbuf();
+                       tag = atoi(buf);
+                       rc = ber_printf( ber, fmt, tag );
+                       break;
 
                default:
                        fprintf( stderr, "encode: unknown fmt %c\n", *fmt );