(G77_hostnm_0): Fix off-by-one error

that was trashing the byte just beyond the CHARACTER*(*)
argument.

From-SVN: r19427
This commit is contained in:
Craig Burley 1998-04-27 10:11:57 +00:00 committed by Dave Love
parent a235cdd775
commit 6b2fe0fbe4

View File

@ -39,7 +39,7 @@ integer G77_hostnm_0 (char *name, ftnlen Lname)
if (ret==0) { if (ret==0) {
/* Pad with blanks (assuming gethostname will make an error /* Pad with blanks (assuming gethostname will make an error
return if it can't fit in the null). */ 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] = ' '; name[i] = ' ';
} }
return ret; return ret;