diff options
author | Dwight Schauer <dschauer@gmail.com> | 2014-08-05 18:57:45 -0500 |
---|---|---|
committer | Dwight Schauer <dschauer@gmail.com> | 2014-08-05 18:57:45 -0500 |
commit | 530d210c910c768a314cdb47bdf60d74fcbb141a (patch) | |
tree | 470df690ebf7b2261ae086d1cf4d35413603eb58 /lib | |
parent | 1e8a9aead060d27099bdd8634cbab6b89ecd9995 (diff) | |
download | Nim-530d210c910c768a314cdb47bdf60d74fcbb141a.tar.gz |
Added carriage return and linefeed check to os::parseCmdLine ti delimiting whitespace eating.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/os.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index a70bfa7f1..44673d3e0 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1457,7 +1457,8 @@ proc parseCmdLine*(c: string): seq[string] {. var a = "" while true: 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): # parse a single argument according to the above rules: if c[i] == '\0': break |