[GRASS-dev] [bug #5037] (grass) GRASS 6.3: d.graph

Hamish hamish_nospam at yahoo.com
Thu Sep 14 05:22:16 EDT 2006


> > > > this bug's URL: http://intevation.de/rt/webrt?serial_num=5037
> > > > ---------------------------------------------------------------
..
> > There's another problem, G_str_to_color() [lib/gis/color_str.c]
> > returns an error if a color is given as a R:G:B triplet.

Glynn:
> IOW, do_graph.c is passing pointers to "unsigned char" fields while
> G_str_to_color() expects pointers to "int"s, resulting in the pointer
> targets overlapping (each is 4 bytes wide, but they start 1 byte
> apart). The value of *red will be the result of reading the entire
> structure as if it was an int.


Thanks (again), that's it. Apparently I got this right in do_graph.c
set_last_color() but didn't in do_symbol().


  (fixed in cvs+6.2)


Hamish




More information about the grass-dev mailing list