Commit 391e799a authored by Scott Abbey's avatar Scott Abbey

Add check for empty

parent ffa9227a
......@@ -102,6 +102,11 @@ pub struct Predicate {
}
pub fn parse(range: &str) -> Result<VersionReq, String> {
// null is an error
if range == "\0" {
return Err(String::from("Null is not a valid VersionReq"));
}
// an empty range is a major version wildcard
// so is a lone * or x of either capitalization
if (range == "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment