Explorar el Código

r.terraflow: backport fix for https://trac.osgeo.org/grass/ticket/1006 from devbr

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42805 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz hace 15 años
padre
commit
f5b5f47063
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      raster/r.terraflow/filldepr.cc

+ 2 - 1
raster/r.terraflow/filldepr.cc

@@ -128,8 +128,9 @@ inmemory_fill_depression(AMI_STREAM<boundaryType> *boundaryStr,
   boundaryType* nextedge;
   elevation_type h;
   cclabel_type u, v, ur, vr;
+  off_t nitems = boundaryStr->stream_len();
   boundaryStr->seek(0);
-  for (size_t i=0; i< boundaryStr->stream_len(); i++) {
+  for (size_t i=0; i< nitems; i++) {
 
     /*read next edge*/
     ae = boundaryStr->read_item(&nextedge);