aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-06 22:47:53 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-06 22:47:53 +0000
commit1d0880145fec382d2cdd5ac896b2b02f58a8c1a9 (patch)
tree60c008939622d1c334968b18e1c5f196918fa7de
parent63dddf547122427eb921b91e1607bd6989de0b3e (diff)
downloadpaludis-1d0880145fec382d2cdd5ac896b2b02f58a8c1a9.tar.gz
paludis-1d0880145fec382d2cdd5ac896b2b02f58a8c1a9.tar.xz
Validate choice names more
-rw-r--r--paludis/choice.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/paludis/choice.cc b/paludis/choice.cc
index 4fb1593..1747b18 100644
--- a/paludis/choice.cc
+++ b/paludis/choice.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -77,7 +77,7 @@ ChoicePrefixNameValidator::validate(const std::string & s)
if (s[0] >= 'A' && s[0] <= 'Z')
throw ChoicePrefixNameError(s);
- if (std::string::npos != s.find(" \t\r\n"))
+ if (std::string::npos != s.find(" \t\r\n()"))
throw ChoicePrefixNameError(s);
}
}
@@ -110,7 +110,7 @@ ChoiceNameWithPrefixValidator::validate(const std::string & s)
break;
};
- if (std::string::npos != s.find(" \t\r\n"))
+ if (std::string::npos != s.find(" \t\r\n()"))
throw ChoiceNameWithPrefixError(s);
}
@@ -142,7 +142,7 @@ UnprefixedChoiceNameValidator::validate(const std::string & s)
break;
};
- if (std::string::npos != s.find(" \t\r\n"))
+ if (std::string::npos != s.find(" \t\r\n()"))
throw ChoiceNameWithPrefixError(s);
}