fix read when requesting out-of-range codec

This commit is contained in:
Yann Collet 2023-12-26 00:11:47 -08:00
parent ded75e76ea
commit f239a17a6b

View File

@ -678,7 +678,7 @@ int fullSpeedBench(const char** fileNamesTable, int nbFiles)
DISPLAY("Compression functions : \n");
continue;
}
if (cAlgNb > (int)NB_COMPRESSION_ALGORITHMS) {
if (cAlgNb >= (int)NB_COMPRESSION_ALGORITHMS) {
continue;
}
compressorName = compDescArray[cAlgNb].name;