diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-02-13 17:30:30 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-02-13 17:30:30 +0200 |
commit | 1d924e584b146136989f48c13fff2632896efb3d (patch) | |
tree | c39356235dc95f05848496a1383e50feaaacee3e /src/xz/args.c | |
parent | Improve support for DOS-like systems. (diff) | |
download | xz-1d924e584b146136989f48c13fff2632896efb3d.tar.xz |
Fix handling of integrity check type in the xz command line tool.
Diffstat (limited to 'src/xz/args.c')
-rw-r--r-- | src/xz/args.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xz/args.c b/src/xz/args.c index 31ff0e58..29abf971 100644 --- a/src/xz/args.c +++ b/src/xz/args.c @@ -294,10 +294,17 @@ parse_real(args_info *args, int argc, char **argv) size_t i = 0; while (strcmp(types[i].str, optarg) != 0) { if (++i == ARRAY_SIZE(types)) - message_fatal(_("%s: Unknown integrity" + message_fatal(_("%s: Unsupported " + "integrity " "check type"), optarg); } + // Use a separate check in case we are using different + // liblzma than what was used to compile us. + if (!lzma_check_is_supported(types[i].check)) + message_fatal(_("%s: Unsupported integrity " + "check type"), optarg); + coder_set_check(types[i].check); break; } |