]> git.sur5r.net Git - cc65/commitdiff
Small change to avoid endless error loops (aborted by the maximum error count)
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 17 Feb 2009 20:56:13 +0000 (20:56 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 17 Feb 2009 20:56:13 +0000 (20:56 +0000)
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

index a880dbdbe120ee0236edb1c4d41ead39b8f0d1a6..db181346b2fabda1d79e24ad46ac820acc876694 100644 (file)
@@ -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;
     }