diff --git a/wildcard.cpp b/wildcard.cpp index 9f8bfc259..e8cd03eb1 100644 --- a/wildcard.cpp +++ b/wildcard.cpp @@ -822,7 +822,7 @@ static int wildcard_expand_internal( const wchar_t *wc, { res = 1; completion_t data_to_push(base_dir); - if ( std::find( out.begin(), out.end(), data_to_push ) != out.end() ){ + if (std::find( out.begin(), out.end(), data_to_push ) == out.end()) { out.push_back( data_to_push); } }