Commit df6ddd73 by Richard Kenner

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

From-SVN: r13263
parent bd8c4b14
...@@ -125,14 +125,13 @@ choose_temp_base () ...@@ -125,14 +125,13 @@ choose_temp_base ()
#endif #endif
len = strlen (base); len = strlen (base);
if (len == 0)
abort ();
temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/ temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
+ strlen (TEMP_FILE) + 1); + strlen (TEMP_FILE) + 1);
strcpy (temp_filename, base); strcpy (temp_filename, base);
#ifndef MPW #ifndef MPW
if (temp_filename[len-1] != '/' if (len != 0
&& temp_filename[len-1] != '/'
&& temp_filename[len-1] != DIR_SEPARATOR) && temp_filename[len-1] != DIR_SEPARATOR)
temp_filename[len++] = DIR_SEPARATOR; temp_filename[len++] = DIR_SEPARATOR;
#else /* MPW */ #else /* MPW */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment