DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2836
Version: 1.3-current
Attached file "copy_same_label_bug_v2.cxx"...
Link: http://www.fltk.org/str.php?L2836
Version: 1.3-current
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <cstring>
int main()
{
char *title = strdup( "this is the title label" );
Fl_Window *win = new Fl_Window( 400, 300 );
win->copy_label( title );
free( title ); // not relevant, just assure title is really copied
win->end();
win->show();
printf( "title: '%s' (%d)\n", win->label(), strlen(win->label()) );
win->hide(); // not relevant, but shuffles the memory a bit
win->copy_label( win->label() ); // trigger the bug!
win->show();
printf( "title: '%s' (%d)\n", win->label(), strlen(win->label()) );
return Fl::run();
}
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs