Added carriage return and linefeed check to os::parseCmdLine ti delimiting whitespace eating.
This commit is contained in:
parent
1e8a9aead0
commit
530d210c91
1 changed files with 2 additions and 1 deletions
|
|
@ -1457,7 +1457,8 @@ proc parseCmdLine*(c: string): seq[string] {.
|
||||||
var a = ""
|
var a = ""
|
||||||
while true:
|
while true:
|
||||||
setLen(a, 0)
|
setLen(a, 0)
|
||||||
while c[i] == ' ' or c[i] == '\t': inc(i)
|
# eat all delimiting whitespace
|
||||||
|
while c[i] == ' ' or c[i] == '\t' or c [i] == '\l' or c [i] == '\r' : inc(i)
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
# parse a single argument according to the above rules:
|
# parse a single argument according to the above rules:
|
||||||
if c[i] == '\0': break
|
if c[i] == '\0': break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue