aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-17 15:09:14 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-17 15:09:14 +0100
commit8ea7710509c42c596b54232980a5a19ae9478c0d (patch)
tree9e5842131a88665ee9b58a51eae7cd34956c1904
parentdfd739aecdc3143ea600e3444a40cc9615a2c3e3 (diff)
downloadpaludis-8ea7710509c42c596b54232980a5a19ae9478c0d.tar.gz
paludis-8ea7710509c42c596b54232980a5a19ae9478c0d.tar.xz
Don't allow # in choice names
Fixes: ticket:1011
-rw-r--r--paludis/choice.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/paludis/choice.cc b/paludis/choice.cc
index 2ed0d86..4604872 100644
--- a/paludis/choice.cc
+++ b/paludis/choice.cc
@@ -75,7 +75,7 @@ WrappedValueTraits<ChoicePrefixNameTag>::validate(const std::string & s)
if (s[0] >= 'A' && s[0] <= 'Z')
return false;
- if (std::string::npos != s.find(" \t\r\n()"))
+ if (std::string::npos != s.find(" \t\r\n()#"))
return false;
}
@@ -108,7 +108,7 @@ WrappedValueTraits<ChoiceNameWithPrefixTag>::validate(const std::string & s)
return false;
};
- if (std::string::npos != s.find(" \t\r\n()"))
+ if (std::string::npos != s.find(" \t\r\n()#"))
return false;
return true;
@@ -142,7 +142,7 @@ WrappedValueTraits<UnprefixedChoiceNameTag>::validate(const std::string & s)
break;
};
- if (std::string::npos != s.find(" \t\r\n()"))
+ if (std::string::npos != s.find(" \t\r\n()#"))
return false;
return true;