diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-12-11 16:03:13 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-12-11 16:03:13 +0000 |
| commit | fdcdc8fd46547a7cd77010db6b57f9cc9f4f51d1 (patch) | |
| tree | e7cfd7b774e59fe9b2092ede165e3dd058a20955 /src/filename_expand.cxx | |
| parent | 6905f61c2c00bd2e6777b0ab9d843fbe1a46dcc4 (diff) | |
Multiple fixes from Sebastien.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/filename_expand.cxx')
| -rw-r--r-- | src/filename_expand.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/filename_expand.cxx b/src/filename_expand.cxx index 06d76721f..8a08557f3 100644 --- a/src/filename_expand.cxx +++ b/src/filename_expand.cxx @@ -1,5 +1,5 @@ // -// "$Id: filename_expand.cxx,v 1.4.2.4.2.1 2001/11/26 00:15:06 easysw Exp $" +// "$Id: filename_expand.cxx,v 1.4.2.4.2.2 2001/12/11 16:03:13 easysw Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // @@ -46,7 +46,7 @@ static inline int isdirsep(char c) {return c=='/' || c=='\\';} int filename_expand(char *to,int tolen, const char *from) { char *temp = new char[tolen]; - strncpy(temp,from, tolen); + strncpy(temp,from, tolen - 1); temp[tolen - 1] = '\0'; char *start = temp; char *end = temp+strlen(temp); @@ -106,5 +106,5 @@ int filename_expand(char *to,int tolen, const char *from) { // -// End of "$Id: filename_expand.cxx,v 1.4.2.4.2.1 2001/11/26 00:15:06 easysw Exp $". +// End of "$Id: filename_expand.cxx,v 1.4.2.4.2.2 2001/12/11 16:03:13 easysw Exp $". // |
