aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Burley <burley@gnu.org>1998-04-27 10:11:57 +0000
committerDave Love <fx@gcc.gnu.org>1998-04-27 10:11:57 +0000
commit6b2fe0fbe437cc48ba37d48db8e0b5d9e5d6ca2e (patch)
treefa7dcabafca61cbea7a80ec27a7feb2b5f6bc92a
parenta235cdd775e6ea16f7ca328da0e0d682646f7a1a (diff)
downloadgcc-6b2fe0fbe437cc48ba37d48db8e0b5d9e5d6ca2e.zip
gcc-6b2fe0fbe437cc48ba37d48db8e0b5d9e5d6ca2e.tar.gz
gcc-6b2fe0fbe437cc48ba37d48db8e0b5d9e5d6ca2e.tar.bz2
(G77_hostnm_0): Fix off-by-one error
that was trashing the byte just beyond the CHARACTER*(*) argument. From-SVN: r19427
-rw-r--r--libf2c/libU77/hostnm_.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libf2c/libU77/hostnm_.c b/libf2c/libU77/hostnm_.c
index 8229e09..fd717b9 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;