summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-06-27 14:42:57 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2020-06-27 14:42:57 +0200
commit39bdb7e89e9abe6c08a0032f2849dec110bfbde2 (patch)
tree75afb1070295ce5107dd635adfe80467c36e2ae3
parent1d6bba7099f27027643a1dadf8d35a09630c560a (diff)
downloadcompilertests-39bdb7e89e9abe6c08a0032f2849dec110bfbde2.tar.gz
compilertests-39bdb7e89e9abe6c08a0032f2849dec110bfbde2.tar.bz2
fixed endless loop in asm-i386 when parsing operands and an unknown symbol appears before newline
-rw-r--r--ecomp-c/asm-i386.c4
1 files changed, 4 insertions, 0 deletions
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;