Fix regression in version string parsing (#563)
This commit is contained in:
parent
3d6dc90cd4
commit
1678142723
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ proc parseVersionRange*(s: string): VersionRange =
|
|||
|
||||
of ' ':
|
||||
# Make sure '0.9 8.03' is not allowed.
|
||||
if version != "" and i < s.len:
|
||||
if version != "" and i < s.len - 1:
|
||||
if s[i+1] in {'0'..'9', '.'}:
|
||||
raise newException(ParseVersionError,
|
||||
"Whitespace is not allowed in a version literal.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue