diff options
| author | erco77 <erco@seriss.com> | 2020-08-01 14:35:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 14:35:44 -0700 |
| commit | 7abc09ad89b4c3d0c17ee8dc9d02ccd261cd13f2 (patch) | |
| tree | 72e461bac5930f8a319d48a6ea99ba793dd35a8b /src/Fl_Image_Reader.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
| parent | e9688822ec68f066f425953278a853e049b93dfb (diff) | |
Merge pull request #116 from erco77/fl_strdup
fl_strdup() implemented + deployed
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; |
