Browse Source

BUG: make sure regex match has a string to match

Bill Hoffman 24 years ago
parent
commit
d241158885
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Source/cmCableClassSet.cxx

+ 3 - 1
Source/cmCableClassSet.cxx

@@ -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;
     }