فهرست منبع

backwards MATCHES in if and else statements

Ken Martin 24 سال پیش
والد
کامیت
c151f30861
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      Source/cmElseCommand.cxx
  2. 1 1
      Source/cmIfCommand.cxx

+ 1 - 1
Source/cmElseCommand.cxx

@@ -100,7 +100,7 @@ bool cmElseCommand::InitialPass(std::vector<std::string>& args)
     cmRegularExpression regEntry(args[2].c_str());
     
     // check for black line or comment
-    if (!regEntry.find(def))
+    if (regEntry.find(def))
       {
       f = new cmIfFunctionBlocker();
       }

+ 1 - 1
Source/cmIfCommand.cxx

@@ -128,7 +128,7 @@ bool cmIfCommand::InitialPass(std::vector<std::string>& args)
     cmRegularExpression regEntry(args[2].c_str());
     
     // check for black line or comment
-    if (regEntry.find(def))
+    if (!regEntry.find(def))
       {
       f = new cmIfFunctionBlocker();
       }