* Fix segfault in file path autocompletion

This commit is contained in:
pancake 2011-06-26 04:55:27 +02:00
parent 814d220ac6
commit 7e8aba2198

View File

@ -132,9 +132,10 @@ static int autocomplete(RLine *line) {
} else *p = 0;
p++;
}
if (p && !*p)
p = "";
n = strlen (p);
if (p) {
if (*p) n = strlen (p);
else p = "";
}
#if 0
printf ("DIR(%s)\n", path);
printf ("FILE(%s)\n", p);