diff --git a/asm/parser.c b/asm/parser.c index 80d8c050..aae47d0c 100644 --- a/asm/parser.c +++ b/asm/parser.c @@ -1175,6 +1175,11 @@ insn *parse_line(char *buffer, insn *result) * put the decorator information in the (opflag_t) type field * of previous operand. */ + if (opnum == 0) { + nasm_nonfatal("decorator without an operand"); + goto fail; + } + opnum--; op--; switch (value->value) { case BRC_RN: