diff --git a/libr/core/core.c b/libr/core/core.c index 3982b4c819..513b2ad2fb 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -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);