* prefix.c (translate_name) Check for empty prefix string.
From-SVN: r30180
This commit is contained in:
parent
1722c704a2
commit
7146dfdd90
@ -1,3 +1,7 @@
|
||||
1999-10-25 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
|
||||
|
||||
* prefix.c (translate_name) Check for empty prefix string.
|
||||
|
||||
Mon Oct 25 23:10:45 1999 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* Makefile.in (CPP_CROSS_NAME): New variable.
|
||||
|
@ -279,8 +279,9 @@ translate_name (name)
|
||||
if (prefix == 0)
|
||||
prefix = PREFIX;
|
||||
|
||||
/* Remove any trailing directory separator from what we got. */
|
||||
if (IS_DIR_SEPARATOR (prefix[strlen (prefix) - 1]))
|
||||
/* Remove any trailing directory separator from what we got. First check
|
||||
for an empty prefix. */
|
||||
if (prefix[0] && IS_DIR_SEPARATOR (prefix[strlen (prefix) - 1]))
|
||||
{
|
||||
char * temp = xstrdup (prefix);
|
||||
temp[strlen (temp) - 1] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user