From 149644df49ba112daeff85f0bed229253516cc8c Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 1 Jul 2022 02:21:44 -0700 Subject: fixed -tm which was broken up to now. --- programs/lz4cli.c | 6 ++++-- programs/lz4io.c | 4 ++-- tests/Makefile | 5 +++++ 3 files changed, 11 insertions(+), 4 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); diff --git a/programs/lz4io.c b/programs/lz4io.c index 78581d8..36736c2 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -1343,8 +1343,8 @@ int LZ4IO_decompressMultipleFilenames( for (i=0; i