Jane wrote:
> hello,
>
> in windows FLTK shows me chars that are not there:
> http://img77006.pictiger.com/images/17220960/z/
>
> in the top you see the file i read from, its plain text, one preset name
> after the other, each exactly 16 chars long. in the middle is the code i use
> to feed the browsers with the names. below the result. as you can see, also
> the buttons get fed by those strings and, yeah, everything that got fed by
> the names of those files looks weird in windows.
> btw, name is: char name[16];
>
> any ideas? ty, jan
You probably aren't making sure name[] is null terminated,
so add() is reading off the end of the string to random memory.
Try instead:
data->file.read(name, 16);
name[15] = '\0';
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk