summaryrefslogtreecommitdiff
path: root/tilde.c
diff options
context:
space:
mode:
Diffstat (limited to 'tilde.c')
-rw-r--r--tilde.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tilde.c b/tilde.c
index 1d38d9d..3741f97 100644
--- a/tilde.c
+++ b/tilde.c
@@ -24,6 +24,9 @@
#endif
#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
# include <unistd.h>
#endif
@@ -189,7 +192,7 @@ tilde_expand (string)
if (result = strchr (string, '~'))
result = xmalloc (result_size = (strlen (string) + 16));
else
- result = xmalloc (result_size = strlen (string));
+ result = xmalloc (result_size = (strlen (string) + 1));
/* Scan through STRING expanding tildes as we come to them. */
while (1)