From 839f52bc18dda4ce96b87c630c935d559e3bcb60 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 31 Oct 2017 16:56:23 +0000 Subject: Fix for STR#3421: Fl_SVG_Image crashes if passed an svg file that is a static const char* string git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- examples/howto-simple-svg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/howto-simple-svg.cxx b/examples/howto-simple-svg.cxx index 6b7c6bc11..b9f41fd71 100644 --- a/examples/howto-simple-svg.cxx +++ b/examples/howto-simple-svg.cxx @@ -59,7 +59,7 @@ int main(int argc, char **argv) { fl_message("You need to build fltk with --enable-nanosvg to use this example."); return(1); #else - Fl_SVG_Image *svg = new Fl_SVG_Image(NULL, (char*)strdup(svg_logo)); // XXX: strdup() shouldn't be needed -- see STR #3421 + Fl_SVG_Image *svg = new Fl_SVG_Image(NULL, svg_logo); Fl_Window *win = new Fl_Window(720, 486, "svg test"); Fl_Box *box = new Fl_Box(10,10,720-20,486-20); box->image(svg); -- cgit v1.2.3