[GRASS-dev] Re: [GRASS-SVN] r40554 - grass/trunk/raster/r.in.bin

Markus Neteler neteler at osgeo.org
Tue Jan 19 21:27:58 EST 2010


On Tue, Jan 19, 2010 at 4:41 PM,  <svn_grass at osgeo.org> wrote:
> Author: glynn
> Date: 2010-01-19 10:41:38 -0500 (Tue, 19 Jan 2010)
> New Revision: 40554
>
> Modified:
>   grass/trunk/raster/r.in.bin/main.c
> Log:
> Fix segfault with -d and anull=...
>
>
> Modified: grass/trunk/raster/r.in.bin/main.c
> ===================================================================
> --- grass/trunk/raster/r.in.bin/main.c  2010-01-19 11:46:59 UTC (rev 40553)
> +++ grass/trunk/raster/r.in.bin/main.c  2010-01-19 15:41:38 UTC (rev 40554)
> @@ -555,7 +555,11 @@
>                    cell[col] = (CELL) (unsigned int)x_i[col];
>            }
>            if (parm.anull->answer) {
> -               if (flag.f->answer) {
> +               if (flag.d->answer) {
> +                   if (dcell[col] == nul_val)
> +                       Rast_set_d_null_value(&dcell[col], 1);
> +               }
> +               else if (flag.f->answer) {
>                    if (fcell[col] == (float)nul_val)
>                        Rast_set_f_null_value(&fcell[col], 1);
>                }


Should this be backported with G_set_[f|d]_null_value()?

Markus


More information about the grass-dev mailing list