diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.cpp index 37753fa3d0c..c899452b720 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.cpp @@ -508,10 +508,21 @@ sofa::core::objectmodel::Base* Node::findLinkDestClass(const core::objectmodel:: } else { - std::size_t p2pos = pathStr.find('/',ppos); - if (p2pos == std::string::npos) p2pos = psize; - std::string nameStr = pathStr.substr(ppos,p2pos-ppos); - ppos = p2pos+1; + std::string nameStr; + if (pathStr[ppos] == '\'') + { + std::size_t p2pos = pathStr.find('\'', ppos + 1); + if (p2pos == std::string::npos) p2pos = psize; + nameStr = pathStr.substr(ppos, p2pos - ppos+1); + ppos = p2pos + 2; + } + else + { + std::size_t p2pos = pathStr.find('/',ppos); + if (p2pos == std::string::npos) p2pos = psize; + nameStr = pathStr.substr(ppos,p2pos-ppos); + ppos = p2pos+1; + } if (master) { if(DEBUG_LINK)