summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index 4cfb4d7..17cdb5c 100644
--- a/main.c
+++ b/main.c
@@ -367,6 +367,9 @@ static struct file *
enter_command_line_file (name)
char *name;
{
+ if (name[0] == '\0')
+ fatal ("empty string invalid as file name");
+
if (name[0] == '~')
{
char *expanded = tilde_expand (name);