Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incorrect iterator advancing #48

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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