diff options
Diffstat (limited to 'mbbsd/name.c')
-rw-r--r-- | mbbsd/name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/name.c b/mbbsd/name.c index af93ccf5..b657e854 100644 --- a/mbbsd/name.c +++ b/mbbsd/name.c @@ -614,7 +614,7 @@ generalnamecomplete(char *prompt, char *data, int len, size_t nmemb, } else { char* first = (*getname)(start); i = ptr; - while ((*compar)(end, first, i + 1) == 0) { + while (first[i] && (*compar)(end, first, i + 1) == 0) { data[i] = first[i]; ++i; } |