Browse Source

v.to.db: better check for Vect_cidx_get_num_cats_by_index

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70707 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 8 years ago
parent
commit
784425ee5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      vector/v.to.db/main.c

+ 1 - 1
vector/v.to.db/main.c

@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
     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 */