summaryrefslogtreecommitdiffstats
path: root/programs/lz4cli.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2022-07-01 09:21:44 (GMT)
committerYann Collet <cyan@fb.com>2022-07-01 09:21:44 (GMT)
commit149644df49ba112daeff85f0bed229253516cc8c (patch)
treea0391ed1009029bffed10d3b22a501bd21328ded /programs/lz4cli.c
parentfcbf585598da6af5878693a58fa460b772e8cc61 (diff)
downloadlz4-149644df49ba112daeff85f0bed229253516cc8c.zip
lz4-149644df49ba112daeff85f0bed229253516cc8c.tar.gz
lz4-149644df49ba112daeff85f0bed229253516cc8c.tar.bz2
fixed -tm
which was broken up to now.
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r--programs/lz4cli.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 54a2e03..45f88f4 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -739,8 +739,10 @@ int main(int argc, const char** argv)
if (ifnIdx == 0) multiple_inputs = 0;
if (mode == om_decompress) {
if (multiple_inputs) {
- const char* const dec_extension = !strcmp(output_filename,stdoutmark) ? stdoutmark : LZ4_EXTENSION;
- assert(ifnIdx <= INT_MAX);
+ const char* dec_extension = LZ4_EXTENSION;
+ if (!strcmp(output_filename, stdoutmark)) dec_extension = stdoutmark;
+ if (!strcmp(output_filename, nulmark)) dec_extension = nulmark;
+ assert(ifnIdx < INT_MAX);
operationResult = LZ4IO_decompressMultipleFilenames(inFileNames, (int)ifnIdx, dec_extension, prefs);
} else {
operationResult = DEFAULT_DECOMPRESSOR(input_filename, output_filename, prefs);