Ticket #11180 (closed defect: fixed)
wxCmdLineParser should allow "-abcd" as well as "-a -b -c -d" as per the documentation
| Reported by: | mfunduc | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9.0 |
| Component: | base | Version: | 2.9.0 |
| Keywords: | wxCmdLineParser switch parsing | Cc: | |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
Current argument needs to be truncated when the rest is pushed to a new argument. Patch is below.
Index: cmdline.cpp
===================================================================
--- cmdline.cpp (revision 237)
+++ cmdline.cpp (working copy)
@@ -725,6 +725,7 @@
// next argument, in fact
wxString arg2 = arg[0u];
arg2 += arg.Mid(len + 1); // +1 for leading '-'
+ arg = arg.Left(len + 1); // The rest gets pushed to the next argument
m_data->m_arguments.insert
(m_data->m_arguments.begin() + n + 1, arg2);

