From 530d210c910c768a314cdb47bdf60d74fcbb141a Mon Sep 17 00:00:00 2001 From: Dwight Schauer <dschauer@gmail.com> Date: Tue, 5 Aug 2014 18:57:45 -0500 Subject: Added carriage return and linefeed check to os::parseCmdLine ti delimiting whitespace eating. --- lib/pure/os.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit 1.4.1-2-gfad0