Bug #995
- Fixed bug #995, which mis-parsed UUIDs in filters as other elements (thanks to Bryce Harrington). - Nibbler no longer permits 8-character UUID abbreviations, because too often they resemble other forms, such as '1111111d' which looks like a duration. - Modified unit tests accordingly.
This commit is contained in:
26
src/A3.cpp
26
src/A3.cpp
@@ -739,6 +739,19 @@ const A3 A3::tokenize (const A3& input) const
|
||||
found_something_after_sequence = true;
|
||||
}
|
||||
|
||||
else if (is_uuid (n, s))
|
||||
{
|
||||
if (found_something_after_sequence)
|
||||
{
|
||||
output.push_back (Arg (s, Arg::type_string, Arg::cat_literal));
|
||||
}
|
||||
else
|
||||
{
|
||||
output.push_back (Arg (s, Arg::type_string, Arg::cat_uuid));
|
||||
found_sequence = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Must be higher than number.
|
||||
// Must be higher than operator.
|
||||
// Note that Nibbler::getDate does not read durations.
|
||||
@@ -809,19 +822,6 @@ const A3 A3::tokenize (const A3& input) const
|
||||
found_something_after_sequence = true;
|
||||
}
|
||||
|
||||
else if (is_uuid (n, s))
|
||||
{
|
||||
if (found_something_after_sequence)
|
||||
{
|
||||
output.push_back (Arg (s, Arg::type_string, Arg::cat_literal));
|
||||
}
|
||||
else
|
||||
{
|
||||
output.push_back (Arg (s, Arg::type_string, Arg::cat_uuid));
|
||||
found_sequence = true;
|
||||
}
|
||||
}
|
||||
|
||||
else if (is_id (n, s))
|
||||
{
|
||||
if (found_something_after_sequence)
|
||||
|
||||
Reference in New Issue
Block a user