]> granicus.if.org Git - xz/commitdiff
xz: Fix use of wrong variable.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 12 Jan 2014 10:17:08 +0000 (12:17 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 26 Apr 2014 05:37:15 +0000 (08:37 +0300)
Since the only call to suffix_set() uses optarg
as the argument, fixing this bug doesn't change
the behavior of the program.

src/xz/suffix.c

index c89f67fe853e356ab802b17b3f444af0d50b654f..8e331a7022a3c45345e45fe50d350e5976db27b4 100644 (file)
@@ -232,7 +232,7 @@ suffix_set(const char *suffix)
        // Empty suffix and suffixes having a directory separator are
        // rejected. Such suffixes would break things later.
        if (suffix[0] == '\0' || has_dir_sep(suffix))
-               message_fatal(_("%s: Invalid filename suffix"), optarg);
+               message_fatal(_("%s: Invalid filename suffix"), suffix);
 
        // Replace the old custom_suffix (if any) with the new suffix.
        free(custom_suffix);