Parcourir la source

martinl: fix https://trac.osgeo.org/grass/ticket/1184

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49172 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz il y a 13 ans
Parent
commit
806454566c
1 fichiers modifiés avec 3 ajouts et 5 suppressions
  1. 3 5
      display/d.vect/attr.c

+ 3 - 5
display/d.vect/attr.c

@@ -47,12 +47,10 @@ int display_attr(struct Map_info *Map, int type, char *attrcol,
     Vect_rewind(Map);
     while (1) {
 	ltype = Vect_read_next_line(Map, Points, Cats);
-	switch (ltype) {
-	case -1:
+	if (ltype == -1)
 	    G_fatal_error(_("Unable to read vector map"));
-	case -2:		/* EOF */
-	    return 0;
-	}
+	else if (ltype == -2)		/* EOF */
+	    break;
 
 	if (!(type & ltype) && !((type & GV_AREA) && (ltype & GV_CENTROID)))
 	    continue;		/* used for both lines and labels */