diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll
index 72b4a4b51f961eca1568a71c3f87f7525d09b62f..994d2420fc2c89022bcbde76cbeea66b16e7a404 100644
--- a/preprocessor/macro/MacroFlex.ll
+++ b/preprocessor/macro/MacroFlex.ll
@@ -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;