[Lemon-commits] [lemon_svn] alpar: r2179 - hugo/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:50:43 CET 2006


Author: alpar
Date: Mon Aug 29 20:21:02 2005
New Revision: 2179

Modified:
   hugo/trunk/lemon/dfs.h

Log:
Serious bugfix.


Modified: hugo/trunk/lemon/dfs.h
==============================================================================
--- hugo/trunk/lemon/dfs.h	(original)
+++ hugo/trunk/lemon/dfs.h	Mon Aug 29 20:21:02 2005
@@ -536,14 +536,17 @@
 	_dist->set(m,_stack_head);
       }
       else {
-	Node n;
-	while(_stack_head>=0 &&
-	      (n=G->source(_stack[_stack_head]),
-	       ++_stack[_stack_head]==INVALID))
-	  {
-	    _processed->set(n,true);
-	    --_stack_head;
-	  }
+	m=G->source(e);
+	++_stack[_stack_head];
+      }
+      //'m' is now the (original) source of the _stack[_stack_head] 
+      while(_stack_head>=0 && _stack[_stack_head]==INVALID) {
+	_processed->set(m,true);
+	--_stack_head;
+	if(_stack_head>=0) {
+	  m=G->source(_stack[_stack_head]);
+	  ++_stack[_stack_head];
+	}
       }
       return e;
     }



More information about the Lemon-commits mailing list