From 88d54cd78bf73348e4f207ab3f741aa374f28b1c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 16 May 2002 12:47:44 +0000 Subject: 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 --- src/Fl_Help_Dialog.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_Help_Dialog.cxx') 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(); }; } -- cgit v1.2.3