kbdmap(1): Fix a segmentation fault with -r.
authorSascha Wildner <saw@online.de>
Sun, 21 Nov 2010 13:23:02 +0000 (14:23 +0100)
committerSascha Wildner <saw@online.de>
Sun, 21 Nov 2010 13:23:48 +0000 (14:23 +0100)
Reported-by: Mikael Moghadam <binarybusiness@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1918>

usr.sbin/kbdmap/kbdmap.c

index 9bae553..b50204f 100644 (file)
@@ -824,9 +824,6 @@ main(int argc, char **argv)
 
        program = extract_name(argv[0]);
 
-       /* Parse command line arguments */
-       parse_args(argc, argv);
-
        font_current = get_font();
        if (font_current == NULL)
                font_current = font_default;
@@ -836,6 +833,9 @@ main(int argc, char **argv)
        else
                dir = keymapdir;
 
+       /* Parse command line arguments */
+       parse_args(argc, argv);
+
        /* Read and display options */
        menu_read();