Skip to content

Commit

Permalink
Fix crash on unknown option
Browse files Browse the repository at this point in the history
getopts requires the last element of longopts to be filled with zeros.
  • Loading branch information
Nestorfish authored and sfan5 committed Sep 29, 2016
1 parent 4db3040 commit 42b36ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mapper.cpp
Expand Up @@ -82,6 +82,7 @@ int main(int argc, char *argv[])
{"max-y", required_argument, 0, 'c'},
{"zoom", required_argument, 0, 'z'},
{"colors", required_argument, 0, 'C'},
{0, 0, 0, 0}
};

std::string input;
Expand Down

0 comments on commit 42b36ec

Please sign in to comment.