From 39bdb7e89e9abe6c08a0032f2849dec110bfbde2 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 27 Jun 2020 14:42:57 +0200 Subject: fixed endless loop in asm-i386 when parsing operands and an unknown symbol appears before newline --- ecomp-c/asm-i386.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ecomp-c/asm-i386.c b/ecomp-c/asm-i386.c index 743d39a..8b80fe2 100644 --- a/ecomp-c/asm-i386.c +++ b/ecomp-c/asm-i386.c @@ -1014,6 +1014,10 @@ static OperandInfo *parseOperand( OpcodeInfo *opcode_info ) assign_label( operand_info, ident ); } Expect( S_rbrak ); + } else if( sym == S_newline ) { + /* ok, end of operands */ + } else { + Abort( "Parse error when parsing operands at '%s'", symname[sym] ); } return operand_info; -- cgit v1.2.3-54-g00ecf