Opened 13 years ago

Closed 13 years ago

#3879 closed Bugs (fixed)

split_winmain misses last argument if it is empty

Reported by: anonymous Owned by: Sascha Ochsenknecht
Milestone: Boost 1.42.0 Component: program_options
Version: Boost 1.41.0 Severity: Optimization
Keywords: split_winmain Cc:

Description

When passing an empty quoted string as last argument to split_winmain, it is not in the returned vector (unless there is a trailing space).

Example:
assert(split_winmain("arg0 \"\"").size() == 2); FAILS (.size() == 1)
assert(split_winmain("arg0 \"\" ").size() == 2);
OK

I appended a quick and dirty patch that should fix this.

btw. I don't know if this is actually a problem for program_options type of command lines, I noticed this when I was using the split_winmain only.

Attachments (1)

winmain.patch (1.6 KB ) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (3)

by anonymous, 13 years ago

Attachment: winmain.patch added

comment:1 by Sascha Ochsenknecht, 13 years ago

Owner: changed from Vladimir Prus to Sascha Ochsenknecht

comment:2 by Sascha Ochsenknecht, 13 years ago

Resolution: fixed
Status: newclosed

(In [59437]) fix in winmain, Fixes #3879

Note: See TracTickets for help on using tickets.