浏览代码

BUG: match called on invalid number

Bill Hoffman 24 年之前
父节点
当前提交
1dc7ae38ea
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmCableDefineSetCommand.cxx

+ 1 - 1
Source/cmCableDefineSetCommand.cxx

@@ -220,7 +220,7 @@ cmCableDefineSetCommand::GenerateTag(const std::string& element,
     }
 
   // Test for basic floating-point type
-  regex.compile("^[ \t]*(long[ ])?[ \t]*(float|double)[ \t]*$");
+  regex.compile("^[ \t]*(long[ ]|)[ \t]*(float|double)[ \t]*$");
   if(regex.find(element))
     {
     tag = "_";