summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.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_Text_Buffer.cxx
parent7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff)
parente9688822ec68f066f425953278a853e049b93dfb (diff)
Merge pull request #116 from erco77/fl_strdup
fl_strdup() implemented + deployed
Diffstat (limited to 'src/Fl_Text_Buffer.cxx')
-rw-r--r--src/Fl_Text_Buffer.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index 9691d7a4a..476f1ec61 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <FL/fl_utf8.h>
+#include <FL/fl_string.h>
#include "flstring.h"
#include <ctype.h>
#include <FL/Fl.H>
@@ -462,7 +463,7 @@ int Fl_Text_Buffer::undo(int *cursorPos)
if (xlen && ilen) {
undobuffersize(ilen + 1);
undobuffer[ilen] = 0;
- char *tmp = strdup(undobuffer);
+ char *tmp = fl_strdup(undobuffer);
replace(b, undoat, tmp);
if (cursorPos)
*cursorPos = mCursorPosHint;