diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 91bce8bb8..f8612f297 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -674,13 +674,19 @@ int main(int argCount, const char* argv[]) } #endif if(operation==zom_list){ - unsigned u; + if(filenameIdx==0){ + DISPLAY("No files given\n"); + CLEAN_RETURN(0); + } DISPLAY("===========================================\n"); DISPLAY("Printing information about compressed files\n"); DISPLAY("===========================================\n"); DISPLAY("Number of files listed: %d\n", filenameIdx); - for(u=0; u