diff options
author | Roland McGrath <roland@redhat.com> | 1993-02-21 20:05:54 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1993-02-21 20:05:54 +0000 |
commit | b50f2fc0a61c0d3719c9acbbb413d8340ed2de7e (patch) | |
tree | cf37900f2cf1030f7dcfde8395dfe5b78ea5000a /commands.c | |
parent | 4034f2bdfbc61a38c4ef4669e30d2757c7f08d33 (diff) | |
download | gunmake-b50f2fc0a61c0d3719c9acbbb413d8340ed2de7e.tar.gz |
Formerly commands.c.~17~
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -44,11 +44,15 @@ set_file_variables (file) if (ar_name (file->name)) { + unsigned int len; p = index (file->name, '('); at = (char *) alloca (p - file->name + 1); bcopy (file->name, at, p - file->name); at[p - file->name] = '\0'; - percent = p + 1; + len = strlen (p + 1); + percent = (char *) alloca (len); + bcopy (p + 1, percent, len - 1); + percent[len - 1] = '\0'; } else #endif /* NO_ARCHIVES. */ |