Ver Fonte

backwards MATCHES in if and else statements

Ken Martin há 24 anos atrás
pai
commit
c151f30861
2 ficheiros alterados com 2 adições e 2 exclusões
  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();
       }