vala r1225 - in trunk: . vala



Author: juergbi
Date: Mon Apr 14 19:00:04 2008
New Revision: 1225
URL: http://svn.gnome.org/viewvc/vala?rev=1225&view=rev

Log:
2008-04-14  Juerg Billeter  <j bitron ch>

	* vala/valaparser.vala: fix infinite loop on invalid syntax,
	  fixes bug 528017


Modified:
   trunk/ChangeLog
   trunk/vala/valaparser.vala

Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala	(original)
+++ trunk/vala/valaparser.vala	Mon Apr 14 19:00:04 2008
@@ -1648,9 +1648,14 @@
 				}
 			} catch (ParseError e) {
 				int r;
-				do {
+				while (true) {
 					r = recover ();
-				} while (r == RecoveryState.STATEMENT_BEGIN);
+					if (r == RecoveryState.STATEMENT_BEGIN) {
+						next ();
+					} else {
+						break;
+					}
+				}
 				if (r == RecoveryState.EOF) {
 					return;
 				}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]