summaryrefslogtreecommitdiff
path: root/src/Fl_Help_Dialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Help_Dialog.cxx')
-rw-r--r--src/Fl_Help_Dialog.cxx6
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();
};
}