diff options
author | Dave Love <d.love@dl.ac.uk> | 1998-04-27 10:11:57 +0000 |
---|---|---|
committer | Dave Love <d.love@dl.ac.uk> | 1998-04-27 10:11:57 +0000 |
commit | 10dad8749b96cc1b03e2319c9b5348f96dab81c3 (patch) | |
tree | fa7dcabafca61cbea7a80ec27a7feb2b5f6bc92a /libf2c/libU77/hostnm_.c | |
parent | 2e97039804cc72b45b10bd69c151a3bc8c8dc92b (diff) |
(G77_hostnm_0): Fix off-by-one error
that was trashing the byte just beyond the CHARACTER*(*)
argument.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@19427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c/libU77/hostnm_.c')
-rw-r--r-- | libf2c/libU77/hostnm_.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libf2c/libU77/hostnm_.c b/libf2c/libU77/hostnm_.c index 8229e09e727..fd717b9f857 100644 --- a/libf2c/libU77/hostnm_.c +++ b/libf2c/libU77/hostnm_.c @@ -39,7 +39,7 @@ integer G77_hostnm_0 (char *name, ftnlen Lname) if (ret==0) { /* Pad with blanks (assuming gethostname will make an error return if it can't fit in the null). */ - for (i=strlen(name); i<=Lname; i++) + for (i=strlen(name); i<Lname; i++) name[i] = ' '; } return ret; |