BUG: make sure regex match has a string to match

This commit is contained in:
Bill Hoffman 2002-01-18 23:38:48 -05:00
parent 5ab173b5ea
commit d241158885
1 changed files with 3 additions and 1 deletions

View File

@ -717,8 +717,10 @@ bool ElementCombinationGenerator::GenerateTag(const cmStdString& element)
if(regex.find(element))
{
m_Tag = "_";
if(regex.match(1) == "long ")
if(regex.start(1) > 0 && regex.match(1) == "long ")
{
m_Tag.append("l");
}
m_Tag.append(regex.match(2));
return true;
}