[GRASS-SVN] r33514 - grass/branches/releasebranch_6_3/raster/wildfire/r.spread

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 23 17:13:38 EDT 2008


Author: neteler
Date: 2008-09-23 17:13:38 -0400 (Tue, 23 Sep 2008)
New Revision: 33514

Modified:
   grass/branches/releasebranch_6_3/raster/wildfire/r.spread/replaceHa.c
Log:
Rainer M Krug <r.m.krug*gmail com>: fix for hanging module (merge from trunk)

Modified: grass/branches/releasebranch_6_3/raster/wildfire/r.spread/replaceHa.c
===================================================================
--- grass/branches/releasebranch_6_3/raster/wildfire/r.spread/replaceHa.c	2008-09-23 21:10:57 UTC (rev 33513)
+++ grass/branches/releasebranch_6_3/raster/wildfire/r.spread/replaceHa.c	2008-09-23 21:13:38 UTC (rev 33514)
@@ -51,7 +51,7 @@
     if ((2 * i < *heap_len) &&
 	(heap[2 * i].min_cost > heap[2 * i + 1].min_cost))
 	smaller_child++;
-    while ((smaller_child <= *heap_len) &&
+    while ( (smaller_child <= *heap_len) && (smaller_child > 0) &&
 	   (new_min_cost > heap[smaller_child].min_cost)) {
 	heap[i].min_cost = heap[smaller_child].min_cost;
 	heap[i].angle = heap[smaller_child].angle;



More information about the grass-commit mailing list