[GRASS-dev] [GRASS-SVN] r54874 - grass/trunk/vector/v.in.ogr
Martin Landa
landa.martin at gmail.com
Sun Feb 3 08:08:51 PST 2013
Hi,
2013/2/3 <svn_grass at osgeo.org>:
> Author: mmetz
> Date: 2013-02-03 08:06:21 -0800 (Sun, 03 Feb 2013)
> New Revision: 54874
>
> Modified:
> grass/trunk/vector/v.in.ogr/main.c
> Log:
> v.in.ogr: fix r54872 for linux
[...]
> len = strlen("SHAPE_ENCODING") + strlen(param.encoding->answer) + 2;
> - buf = G_malloc(len * sizeof(char));
> + encbuf = G_malloc(len * sizeof(char));
> /* -> Esri Shapefile */
> - sprintf(buf, "SHAPE_ENCODING=%s", param.encoding->answer);
> - putenv(buf);
> + sprintf(encbuf, "SHAPE_ENCODING=%s", param.encoding->answer);
> + encp = G_store(encbuf);
> + putenv(encp);
any reason why not use G_asprintf() ? Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
More information about the grass-dev
mailing list