Added constructor to completion_t for guarranted initialzation of flags attribute.

This commit is contained in:
Siteshwar Vashisht
2012-01-16 23:54:57 +05:30
parent 6f330f961b
commit 7e124cf95e
7 changed files with 26 additions and 12 deletions

View File

@@ -897,7 +897,8 @@ static int wildcard_expand_internal( const wchar_t *wc,
else
{
res = 1;
completion_t data_to_push = { base_dir };
completion_t data_to_push;
data_to_push.completion = base_dir;
if ( std::find( out.begin(), out.end(), data_to_push ) != out.end() ){
out.push_back( data_to_push);
}
@@ -970,7 +971,8 @@ static int wildcard_expand_internal( const wchar_t *wc,
}
else
{
completion_t data_to_push = { long_name };
completion_t data_to_push;
data_to_push.completion = long_name;
out.push_back( data_to_push );
}
res = 1;