Fixed `mode == 0` in `ZydisDecoderEnableMode`

This commit is contained in:
Joel Höner 2017-11-03 22:48:33 +01:00
parent cbf06b1bf3
commit a227bd4bbe
1 changed files with 1 additions and 1 deletions

View File

@ -4433,7 +4433,7 @@ ZydisStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMode machineMode
ZydisStatus ZydisDecoderEnableMode(ZydisDecoder* decoder, ZydisDecoderMode mode, ZydisBool enabled) ZydisStatus ZydisDecoderEnableMode(ZydisDecoder* decoder, ZydisDecoderMode mode, ZydisBool enabled)
{ {
if (!decoder || !mode || (mode > ZYDIS_DECODER_MODE_MAX_VALUE)) if (!decoder || (mode > ZYDIS_DECODER_MODE_MAX_VALUE))
{ {
return ZYDIS_STATUS_INVALID_PARAMETER; return ZYDIS_STATUS_INVALID_PARAMETER;
} }