Fixed reader.cpp to not show garbage while showing help on auto completing (on pressin tab) for executables like "ls -"

This commit is contained in:
Siteshwar Vashisht
2012-01-19 00:03:19 +05:30
parent 7e124cf95e
commit c959584831
7 changed files with 22 additions and 18 deletions

View File

@@ -166,7 +166,7 @@ wchar_t **completions_to_char_arr( std::vector<completion_t> &l )
}
for( i=0; i< l.size(); i++ )
{
res[i] = (wchar_t *)l.at(i).completion.c_str();
res[i] = const_cast<wchar_t*>(l.at(i).completion.c_str());
}
res[i]='\0';
return res;