summaryrefslogtreecommitdiff
path: root/src/Fl_SVG_Image.cxx
diff options
context:
space:
mode:
authorerco77 <erco@seriss.com>2020-08-01 14:35:44 -0700
committerGitHub <noreply@github.com>2020-08-01 14:35:44 -0700
commit7abc09ad89b4c3d0c17ee8dc9d02ccd261cd13f2 (patch)
tree72e461bac5930f8a319d48a6ea99ba793dd35a8b /src/Fl_SVG_Image.cxx
parent7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff)
parente9688822ec68f066f425953278a853e049b93dfb (diff)
Merge pull request #116 from erco77/fl_strdup
fl_strdup() implemented + deployed
Diffstat (limited to 'src/Fl_SVG_Image.cxx')
-rw-r--r--src/Fl_SVG_Image.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx
index ca9644fe1..93aaee28b 100644
--- a/src/Fl_SVG_Image.cxx
+++ b/src/Fl_SVG_Image.cxx
@@ -21,6 +21,7 @@
#include <FL/Fl_SVG_Image.H>
#include <FL/fl_utf8.h>
#include <FL/fl_draw.H>
+#include <FL/fl_string.h>
#include "Fl_Screen_Driver.H"
#include <stdio.h>
#include <stdlib.h>
@@ -152,7 +153,7 @@ void Fl_SVG_Image::init_(const char *filename, const char *in_filedata, Fl_SVG_I
if (!filedata) ld(ERR_FILE_ACCESS);
} else {
// XXX: Make internal copy -- nsvgParse() modifies filedata during parsing (!)
- filedata = in_filedata ? strdup(in_filedata) : NULL;
+ filedata = in_filedata ? fl_strdup(in_filedata) : NULL;
}
if (filedata) {
counted_svg_image_->svg_image = nsvgParse(filedata, "px", 96);