From c4dac550a8cc3d81fb4894384fc7d299c35d5d9b Mon Sep 17 00:00:00 2001 From: uz Date: Tue, 17 Feb 2009 20:56:13 +0000 Subject: [PATCH] Small change to avoid endless error loops (aborted by the maximum error count) if an unexpected token is encountered in Primary(). git-svn-id: svn://svn.cc65.org/cc65/trunk@3936 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/expr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index a880dbdbe..db181346b 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -763,8 +763,11 @@ static void Primary (ExprDesc* E) break; default: - /* Illegal primary. */ + /* Illegal primary. Be sure to skip the token to avoid endless + * error loops. + */ Error ("Expression expected"); + NextToken (); ED_MakeConstAbsInt (E, 1); break; } -- 2.39.5