> On 12/21/11 13:54, mattes wrote:
> > for ( int i=0; i< sizeof(data_colpercent); i++ ) {
> > data_widths[i] = w * data_colpercent[i] /100;
> > }
>
> You're overrunning memory here.
>
> sizeof() returns the number of bytes in the array,
> not the number of elements.
>
> Change the sizeof(data_colpercent) to 9,
> and it won't crash.
Thanx Greg,
Totally spaced on that, daahh!
I actually fixed up like this:
for ( int i=0; i< sizeof(data_colpercent)/sizeof(int); i++ ) {
and that works just dandy.
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs