preprocessor: fix bug introduced in 1ba04976aa. #1039

time-shift
Houtan Bastani 2015-08-28 11:13:19 +02:00
parent c9a808f704
commit 6016d9fc1d
1 changed files with 2 additions and 1 deletions

View File

@ -401,7 +401,8 @@ MacroFlex::create_include_context(string *filename, Macro::parser::location_type
dirs << "." << FILESEP << endl;
for (vector<string>::const_iterator it = path.begin(); it != path.end(); it++)
{
input = new ifstream(it->c_str() + FILESEP + filename->c_str(), ios::binary);
string testfile = *it + FILESEP + *filename;
input = new ifstream(testfile.c_str(), ios::binary);
if (input->good())
break;
dirs << *it << endl;