[GRASS-dev] Re: [GRASS-SVN] r34608 - grass/branches/develbranch_6/vector/v.in.ascii

Hi,

well, this fix doesn't solve problem in wxGUI (range of SpinCtrl). I
think it should be fixed in gislib level.

Martin

2008/11/29 <svn_grass@osgeo.org>:

Author: hamish
Date: 2008-11-28 19:34:25 -0500 (Fri, 28 Nov 2008)
New Revision: 34608

Modified:
  grass/branches/develbranch_6/vector/v.in.ascii/in.c
Log:
Column numbers must not be negative (trac #278)

Modified: grass/branches/develbranch_6/vector/v.in.ascii/in.c

--- grass/branches/develbranch_6/vector/v.in.ascii/in.c 2008-11-28 23:04:15 UTC (rev 34607)
+++ grass/branches/develbranch_6/vector/v.in.ascii/in.c 2008-11-29 00:34:25 UTC (rev 34608)
@@ -193,6 +193,9 @@

    catcol = atoi(catcol_opt->answer) - 1;

+ if (xcol+1 < 1 || ycol+1 < 1 || zcol+1 < 0 || catcol+1 < 0)
+ G_fatal_error(_("Column numbers must not be negative"));
+
    if (old->answer != NULL) {
       if ((ascii = fopen(old->answer, "r")) == NULL) {
           G_fatal_error(_("Unable to open ASCII file <%s>"), old->answer);

_______________________________________________
grass-commit mailing list
grass-commit@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-commit

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *