mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 03:44:04 +08:00
(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:
parent
a235cdd775
commit
6b2fe0fbe4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user