From 38443b077588d46278748b328cddd436830c75eb Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Fri, 28 Aug 2015 11:13:19 +0200 Subject: [PATCH] preprocessor: fix bug introduced in 1ba04976aac043deca38edb03e0dfc866dfadd67. #1039 --- macro/MacroFlex.ll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macro/MacroFlex.ll b/macro/MacroFlex.ll index 72b4a4b5..994d2420 100644 --- a/macro/MacroFlex.ll +++ b/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; -- GitLab