[GRASS-SVN] r56396 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 24 03:54:57 PDT 2013
Author: martinl
Date: 2013-05-24 03:54:57 -0700 (Fri, 24 May 2013)
New Revision: 56396
Modified:
grass/trunk/lib/vector/Vlib/type.c
Log:
vlib: fix Vect_option_to_types() for `type=auto` (v.out.ogr)
Modified: grass/trunk/lib/vector/Vlib/type.c
===================================================================
--- grass/trunk/lib/vector/Vlib/type.c 2013-05-23 21:36:20 UTC (rev 56395)
+++ grass/trunk/lib/vector/Vlib/type.c 2013-05-24 10:54:57 UTC (rev 56396)
@@ -25,10 +25,13 @@
*/
int Vect_option_to_types(const struct Option *type_opt)
{
- int i = 0;
- int type = 0;
-
- while (type_opt->answers[i]) {
+ int i, type;
+
+ type = 0;
+ for(i = 0; type_opt->answers[i]; i++) {
+ if (strcmp(type_opt->answers[i], "auto") == 0)
+ continue;
+
switch (type_opt->answers[i][0]) {
case 'p':
type |= GV_POINT;
@@ -55,7 +58,6 @@
type |= GV_VOLUME;
break;
}
- i++;
}
return type;
More information about the grass-commit
mailing list