fixed ZSTD_format_e value validation

dev
Yann Collet 2017-09-27 12:22:22 -07:00
parent ecf1778e23
commit c994932788
1 changed files with 1 additions and 1 deletions

View File

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