(choose_temp_base): Don't dump core if TMPDIR is empty.

From-SVN: r13263
This commit is contained in:
Richard Kenner 1996-12-10 17:04:20 -05:00
parent bd8c4b14b5
commit df6ddd7337

View File

@ -125,14 +125,13 @@ choose_temp_base ()
#endif
len = strlen (base);
if (len == 0)
abort ();
temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
+ strlen (TEMP_FILE) + 1);
strcpy (temp_filename, base);
#ifndef MPW
if (temp_filename[len-1] != '/'
if (len != 0
&& temp_filename[len-1] != '/'
&& temp_filename[len-1] != DIR_SEPARATOR)
temp_filename[len++] = DIR_SEPARATOR;
#else /* MPW */