From 2141c63628a831d3f53dad7035c94028f8d0d629 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Tue, 21 Jul 2020 20:15:41 -0700 Subject: Implement + deploy fl_strdup() --- src/Fl_Image_Reader.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Fl_Image_Reader.cxx') diff --git a/src/Fl_Image_Reader.cxx b/src/Fl_Image_Reader.cxx index 1f19379a0..f9a886b0f 100644 --- a/src/Fl_Image_Reader.cxx +++ b/src/Fl_Image_Reader.cxx @@ -22,6 +22,7 @@ #include "Fl_Image_Reader.h" #include +#include #include #include @@ -40,7 +41,7 @@ int Fl_Image_Reader::open(const char *filename) { if (!filename) return -1; - pName = strdup(filename); + pName = fl_strdup(filename); if ( (pFile = fl_fopen(filename, "rb")) == NULL ) { return -1; } @@ -51,7 +52,7 @@ int Fl_Image_Reader::open(const char *filename) { // Initialize the reader for memory access, name is copied and stored int Fl_Image_Reader::open(const char *imagename, const unsigned char *data) { if (imagename) - pName = strdup(imagename); + pName = fl_strdup(imagename); if (data) { pStart = pData = data; pIsData = 1; -- cgit v1.2.3