summaryrefslogtreecommitdiff
path: root/src/Fl_File_Input.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-16 12:47:44 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-16 12:47:44 +0000
commit88d54cd78bf73348e4f207ab3f741aa374f28b1c (patch)
treed9310acf36b480d31f0c1527520fe7376f7953ca /src/Fl_File_Input.cxx
parent36546824762618bbe76d4ac72b632ca9927acd9f (diff)
Massive update to use strlcpy() and strlcat() instead of strncpy()
and strncat() in almost all places (there are still a few strncpy's that need to be used...) Added configure check for strlcat() and strlcpy(). Added emulation code for strlcat() and strlcpy(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Input.cxx')
-rw-r--r--src/Fl_File_Input.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Fl_File_Input.cxx b/src/Fl_File_Input.cxx
index 54a54d98e..03dca8722 100644
--- a/src/Fl_File_Input.cxx
+++ b/src/Fl_File_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Input.cxx,v 1.1.2.1 2002/04/30 21:50:16 easysw Exp $"
+// "$Id: Fl_File_Input.cxx,v 1.1.2.2 2002/05/16 12:47:43 easysw Exp $"
//
// File_Input header file for the Fast Light Tool Kit (FLTK).
//
@@ -24,7 +24,6 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org".
//
-//#include <FL/Fl_File_Input.H>
#include <FL/Fl.H>
#include <FL/Fl_File_Input.H>
#include <FL/fl_draw.H>
@@ -228,8 +227,7 @@ Fl_File_Input::handle_button(int event) // I - Event
if (!buttons_[i] || event != FL_RELEASE) return 1;
// Figure out where to truncate the path...
- strncpy(newvalue, value(), sizeof(newvalue) - 1);
- newvalue[sizeof(newvalue) - 1] = '\0';
+ strlcpy(newvalue, value(), sizeof(newvalue));
for (start = newvalue, end = start; start && i >= 0; start = end, i --) {
// printf(" start = \"%s\"\n", start);
@@ -255,5 +253,5 @@ Fl_File_Input::handle_button(int event) // I - Event
//
-// End of "$Id: Fl_File_Input.cxx,v 1.1.2.1 2002/04/30 21:50:16 easysw Exp $".
+// End of "$Id: Fl_File_Input.cxx,v 1.1.2.2 2002/05/16 12:47:43 easysw Exp $".
//