]> git.tdb.fi Git - builder.git/commitdiff
Fix a bug in condition evaluation
authorMikko Rasa <tdb@tdb.fi>
Wed, 25 May 2011 07:38:00 +0000 (07:38 +0000)
committerMikko Rasa <tdb@tdb.fi>
Wed, 25 May 2011 07:38:00 +0000 (07:38 +0000)
source/condition.cpp

index 136b852fccd30c6e2b6ed2f7701ca8004e771c50..0b020ea5d74e247414368e58ac032b15c676a1d4 100644 (file)
@@ -27,7 +27,7 @@ Condition::Condition(SourcePackage &p, const string &expr):
                if(token==string::npos)
                        expression.insert(StringMap::value_type(*i, "="));
                else if(token==0 && (*i)[0]=='!')
-                       expression.insert(StringMap::value_type(*i, "!"));
+                       expression.insert(StringMap::value_type(i->substr(1), "!"));
                else
                        expression.insert(StringMap::value_type(i->substr(0, token), i->substr(token)));
        }