Fix name matching for ssh-dialog, fix bug 80.

This commit is contained in:
Dave Davenport 2014-09-01 19:52:48 +02:00
parent 5d5b4aac9f
commit 5f33d506b9
1 changed files with 6 additions and 5 deletions

View File

@ -154,14 +154,15 @@ static char ** get_ssh ( unsigned int *length )
;
}
for ( stop = start; isalnum ( buffer[stop] ) ||
buffer[stop] == '_' ||
buffer[stop] == '.'; stop++ ) {
;
for ( stop = start; !isspace(buffer[stop]) ; stop++ ) {
// We do not want to show wildcard entries, as you cannot ssh to them.
if ( buffer[stop] == '?' || buffer[stop] == '*' ) {
stop = start;
break;
}
}
int found = 0;
if ( start == stop ) {
continue;
}