[anjuta/gnome-3-4] cxxparser: avoid infinite loop. Fixed bgo#679772



commit d50b457428e812a2b2babd11e84492cec837a357
Author: Massimo Corà <mcora src gnome org>
Date:   Sat Jul 14 01:41:07 2012 +0200

    cxxparser: avoid infinite loop. Fixed bgo#679772

 .../cxxparser/engine-parser.cpp                    |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
index 0aadbc3..e80fb8b 100644
--- a/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
+++ b/plugins/language-support-cpp-java/cxxparser/engine-parser.cpp
@@ -248,6 +248,13 @@ EngineParser::getNearestClassInCurrentScopeChainByFileLine (const char* full_fil
 			parent_iter =
 				ianjuta_symbol_query_search_parent_scope (_query_parent_scope,
 				                                          node, NULL);
+
+			if (ianjuta_symbol_get_int (IANJUTA_SYMBOL (iter), IANJUTA_SYMBOL_FIELD_ID, NULL) == 
+			    ianjuta_symbol_get_int (IANJUTA_SYMBOL (parent_iter), IANJUTA_SYMBOL_FIELD_ID, NULL))
+			{
+				break;
+			}			    
+			
 			g_object_unref (iter);
 			iter = parent_iter;
 		} while (iter);



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