diff --git a/lib/IlmCtl/CtlInterpreter.cpp b/lib/IlmCtl/CtlInterpreter.cpp index 93d251bd..f22058e7 100755 --- a/lib/IlmCtl/CtlInterpreter.cpp +++ b/lib/IlmCtl/CtlInterpreter.cpp @@ -249,7 +249,7 @@ Interpreter::findModule (const string& moduleName) } THROW (ArgExc, "Cannot find CTL module \"" << moduleName << "\"."); - return ""; + return ""; // return to prevent a warning with some compilers. } @@ -269,7 +269,7 @@ Interpreter::findModule (const string& moduleName) } THROW (ArgExc, "Cannot find CTL module \"" << moduleName << "\"."); - return ""; + return ""; // return to prevent a warning with some compilers. } void @@ -435,7 +435,12 @@ Interpreter::loadModuleRecursive (const string &moduleName, const string &fileNa return; } - string realFileName = fileName.empty() ? findModule (moduleName) : fileName; + string realFileName; + if(fileName.empty() && !moduleName.empty()) + realFileName = findModule (moduleName); + else + realFileName = fileName; + _loadModule(moduleName, realFileName, moduleSource); }