Browse Source

v.select: update for direct read access

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48936 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 years ago
parent
commit
f6cc01ed2d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      vector/v.select/main.c

+ 2 - 2
vector/v.select/main.c

@@ -88,13 +88,13 @@ int main(int argc, char *argv[])
     
     for (iopt = 0; iopt < 2; iopt++) {
 	itype[iopt] = Vect_option_to_types(parm.type[iopt]);
-	ifield[iopt] = atoi(parm.field[iopt]->answer);
 
 	Vect_check_input_output_name(parm.input[iopt]->answer, parm.output->answer,
 				     GV_FATAL_EXIT);
 
 	Vect_set_open_level(2);
-	Vect_open_old(&(In[iopt]), parm.input[iopt]->answer, "");
+	Vect_open_old2(&(In[iopt]), parm.input[iopt]->answer, "", parm.field[iopt]->answer);
+	ifield[iopt] = Vect_get_field_number(&(In[iopt]), parm.field[iopt]->answer);
     }
 
     /* Alloc space for input lines array */