[GRASS5] Re: [bug #223] (grass) d.zoom segfaults

Markus Neteler neteler at geog.uni-hannover.de
Wed Mar 21 04:41:02 EST 2001


Hi,

Huidae has applied changes to
src/libes/gis/find_file.c
src/libes/gis/file_name.c

(for all those not listening to the CVS commits announce channel at:
 http://www.geog.uni-hannover.de/grass/grasscvscommit.html
)

Hope this fixes the problems.

Markus

On Tue, Mar 20, 2001 at 06:32:07PM +0100, Edzer J. Pebesma wrote:
> Sorry about my previous post -- I intended to send it to Job in
> private, but overlooked the Reply-To field. Now I owe you a translation:
> 
> spijker at geo.uu.nl wrote:
> 
> > The solution (or: my solution) is the following diff for find_file.c. I
> > can submit it to the CVS but I don't like to mess with libraries and I
> > don't know if there is a 'philosophy' behind the original method.
> > 
> > 54c54,56
> > <       strcpy(mapset, xmapset);
> > ---
> > >       if (!mapset=="") {
> > >           strcpy(mapset, xmapset);
> > >       }
> 
> Be careful about comparing mapset directly to ""; please try the
> example program below to see why.
> 
> A more defensive solution might be:
>    
>    if (mapset != NULL && *mapset != '\0') {
> 
> (it doesn't need to know whether mapset is a character array or a 
> pointer to a character).
> --
> Edzer


-- 
Markus Neteler *  University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494  Fax: -3984

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list