Quellcode durchsuchen

fix if logic for null defs

Bill Hoffman vor 24 Jahren
Ursprung
Commit
c0cd47a402
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      Source/cmIfCommand.cxx

+ 1 - 1
Source/cmIfCommand.cxx

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