From: uz Date: Tue, 17 Feb 2009 20:56:13 +0000 (+0000) Subject: Small change to avoid endless error loops (aborted by the maximum error count) X-Git-Tag: V2.13.0rc1~319 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c4dac550a8cc3d81fb4894384fc7d299c35d5d9b;p=cc65 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 --- 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; }