Boost logo

Boost :

From: Philipp Henkel (threadpool_at_[hidden])
Date: 2006-08-09 12:29:47


I discovered a bug in split_winmain.
If the wstring version of the function is used the result vector is
always empty:

Original code in libs/program_options/src/winmain.cpp:

    BOOST_PROGRAM_OPTIONS_DECL std::vector<std::wstring>
    split_winmain(const std::wstring& cmdline)
        vector<wstring> result;
        vector<string> aux = split_winmain(to_internal(cmdline));
        for (unsigned i = 0, e = result.size(); i < e; ++i)
        return result;

The expression result.size() in the for-loop has to be replaced with aux.size().

At least boost lib 1.33.0 and 1.33.1 contain this bug but I think
nobody used the function for years...

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at