diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-05-16 12:47:44 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-05-16 12:47:44 +0000 |
| commit | 88d54cd78bf73348e4f207ab3f741aa374f28b1c (patch) | |
| tree | d9310acf36b480d31f0c1527520fe7376f7953ca /src/Fl_Help_Dialog.cxx | |
| parent | 36546824762618bbe76d4ac72b632ca9927acd9f (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_Help_Dialog.cxx')
| -rw-r--r-- | src/Fl_Help_Dialog.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Help_Dialog.cxx b/src/Fl_Help_Dialog.cxx index 88ea74f41..2d1645555 100644 --- a/src/Fl_Help_Dialog.cxx +++ b/src/Fl_Help_Dialog.cxx @@ -1,6 +1,7 @@ // generated by Fast Light User Interface Designer (fluid) version 1.0100 #include "../FL/Fl_Help_Dialog.H" +#include "flstring.h" inline void Fl_Help_Dialog::cb_view__i(Fl_Help_View*, void*) { if (view_->changed()) @@ -16,7 +17,7 @@ inline void Fl_Help_Dialog::cb_view__i(Fl_Help_View*, void*) { max_ = index_; - strcpy(file_[index_], view_->filename()); + strlcpy(file_[index_], view_->filename(),sizeof(file_[0])); line_[index_] = view_->topline(); if (index_ > 0) @@ -29,8 +30,7 @@ inline void Fl_Help_Dialog::cb_view__i(Fl_Help_View*, void*) { } else if (view_->filename()) { - strncpy(file_[index_], view_->filename(), 255); - file_[index_][255] = '\0'; + strlcpy(file_[index_], view_->filename(), sizeof(file_[0])); line_[index_] = view_->topline(); }; } |
