Sfoglia il codice sorgente

r.stream.distance: Don't allocate too much fifo memory. Use the same size as other r.stream.* modules

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61556 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 10 anni fa
parent
commit
fd55c4d934
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      raster/r.stream.distance/main.c

+ 1 - 1
raster/r.stream.distance/main.c

@@ -138,7 +138,7 @@ int main(int argc, char *argv[])
     ncols = Rast_window_cols();
     G_begin_distance_calculations();
 
-    fifo_max = 4 * nrows * ncols;
+    fifo_max = 4 * (nrows + ncols);
     fifo_points = (POINT *) G_malloc((fifo_max + 1) * sizeof(POINT));
 
     if (!segmentation) {