Skip to content

Conversation

Flast
Copy link
Contributor

@Flast Flast commented Nov 21, 2018

args always doesn't contain program name, so it shouldn't advance the iterator at first.

Callers are always skipping its name.

int main( int argc, char ** argv )
{
std::vector<std::string> args;
while ( argc > 1 )
{
args.push_back( argv[1] );

int cpp_main( int argc, char * argv[] ) // note name!
{
std::vector<std::string> process_jam_log_args;
std::vector<std::string> library_status_args;
std::vector<std::string> b2_args;
std::string log_name;
process_jam_log_args.push_back("process_jam_log");
library_status_args.push_back("library_status");
--argc; ++argv;

`args` always doesn't contain program name, so it shouldn't advance the iterator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant