- if (tfullPathScriptName.substr(tfullPathScriptName.size()-4, 3)==".bb")
- {
- fullPathScriptName = tfullPathScriptName;
- if ( ! Utilities::FileExists(fullPathScriptName) )
- {
- // The following is *NOT* a debug time message :
- // It's a user intended message.
- // Please don't remove it.
- bbtkMessage("Interpreter",2,
- " [" <<fullPathScriptName <<"] : does not exist"
- <<std::endl);
- continue; // try next path
- }
- bbtkMessage("Interpreter",2,
- " [" <<fullPathScriptName
- <<"] : found" <<std::endl);
- foundFile = true;
- break; // a script was found; we stop iterating
- }
- else
- {
- fullPathScriptName = tfullPathScriptName + ".bbs";
- // Check if library exists
- if ( ! Utilities::FileExists(fullPathScriptName) )
+//Addition JCP tfullPathScriptName.size()>=4
+ if(tfullPathScriptName.size()>=4){
+ if (tfullPathScriptName.substr(tfullPathScriptName.size()-4, 3)==".bb")