diff --git a/rostests/rosautotest/CWineTest.cpp b/rostests/rosautotest/CWineTest.cpp index 471e6ab7e98..976343b8296 100644 --- a/rostests/rosautotest/CWineTest.cpp +++ b/rostests/rosautotest/CWineTest.cpp @@ -227,7 +227,7 @@ CWineTest::GetNextTestInfo() TestInfo->CommandLine += AsciiToUnicode(m_CurrentTest); /* Store the Module name */ - UnderscorePosition = m_CurrentFile.find('_'); + UnderscorePosition = m_CurrentFile.find_last_of('_'); if(UnderscorePosition == m_CurrentFile.npos) {