Skip to content

Commit

Permalink
Fix arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Commandeur committed Dec 5, 2016
1 parent 19cf8fc commit 4d05c91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ int main(int argc, const char * argv[]) {
"under certain conditions; for details run 3dfier with the '--license' option.\n";

std::string filename;
std::string argString = argv[1];

//-- reading the config file
if (argc == 2) {
Expand All @@ -78,7 +77,7 @@ int main(int argc, const char * argv[]) {
return 0;
}
}
else if (argc == 4 && (std::string)argv[2] == "-o" && argString.substr(argString.length() - 3) == "yml") {
else if (argc == 4 && ((std::string)argv[1]).substr(((std::string)argv[1]).length()-3) == "yml" && (std::string)argv[2] == "-o") {
filename = argv[3];
}
else {
Expand Down

0 comments on commit 4d05c91

Please sign in to comment.