mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Duration: No longer accepts 123e456d as a duration
- Prohibits the use of [eE] in the units. - Permits use of [+-] only in the first position.
This commit is contained in:
parent
f68d6fd812
commit
695185e62e
1 changed files with 5 additions and 1 deletions
|
@ -332,7 +332,11 @@ bool Duration::parse (const std::string& input, std::string::size_type& start)
|
|||
}
|
||||
}
|
||||
|
||||
else if (n.getNumber (number))
|
||||
else if (n.getNumber (number) &&
|
||||
number.find ('e') == std::string::npos &&
|
||||
number.find ('E') == std::string::npos &&
|
||||
(number.find ('+') == std::string::npos || number.find ('+') == 0) &&
|
||||
(number.find ('-') == std::string::npos || number.find ('-') == 0))
|
||||
{
|
||||
n.skipWS ();
|
||||
if (n.getOneOf (units, unit))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue