fixed ZSTD_format_e value validation

This commit is contained in:
Yann Collet 2017-09-27 12:22:22 -07:00
parent ecf1778e23
commit c994932788

View File

@ -330,7 +330,7 @@ size_t ZSTD_CCtxParam_setParameter(
switch(param)
{
case ZSTD_p_format :
if (value > (unsigned)ZSTD_f_zstd1)
if (value > (unsigned)ZSTD_f_zstd1_magicless)
return ERROR(parameter_unsupported);
params->format = (ZSTD_format_e)value;
return 0;