diff options
| author | Greg Ercolano <erco@seriss.com> | 2020-07-21 20:15:41 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2020-08-01 14:19:40 -0700 |
| commit | 2141c63628a831d3f53dad7035c94028f8d0d629 (patch) | |
| tree | 614cb7b627da2decbb7cfe49c081f9d7b4140c58 /src/Fl_Image_Reader.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
Implement + deploy fl_strdup()
Diffstat (limited to 'src/Fl_Image_Reader.cxx')
| -rw-r--r-- | src/Fl_Image_Reader.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 <FL/fl_utf8.h> +#include <FL/fl_string.h> #include <stdlib.h> #include <string.h> @@ -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; |
