decode: Return partial error on incomplete opcode

This commit is contained in:
Alexis Engelke
2020-06-14 14:01:39 +02:00
parent 8716bd1991
commit 545ec30ad0
4 changed files with 23 additions and 10 deletions

View File

@@ -416,7 +416,7 @@ fd_decode(const uint8_t* buffer, size_t len_sz, int mode_int, uintptr_t address,
}
if (UNLIKELY(kind != ENTRY_INSTR))
return FD_ERR_UD;
return kind == 0 ? FD_ERR_UD : FD_ERR_PARTIAL;
struct InstrDesc* desc = (struct InstrDesc*) table;