[GRASS-SVN] r70707 - grass/trunk/vector/v.to.db

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 1 03:10:26 PST 2017


Author: hcho
Date: 2017-03-01 03:10:26 -0800 (Wed, 01 Mar 2017)
New Revision: 70707

Modified:
   grass/trunk/vector/v.to.db/main.c
Log:
v.to.db: better check for Vect_cidx_get_num_cats_by_index

Modified: grass/trunk/vector/v.to.db/main.c
===================================================================
--- grass/trunk/vector/v.to.db/main.c	2017-03-01 11:08:54 UTC (rev 70706)
+++ grass/trunk/vector/v.to.db/main.c	2017-03-01 11:10:26 UTC (rev 70707)
@@ -80,7 +80,7 @@
     Values = (struct value *) G_calloc(n + 1, sizeof(struct value));
 
     /* prepopulate Values */
-    if (n > 0)
+    if (findex > 0)
 	n = Vect_cidx_get_num_cats_by_index(&Map, findex);
     i = 0;
     Values[i].cat = -1;		/* features without category */



More information about the grass-commit mailing list