X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fsettings.h;h=b95fbd1845ef4f5eae88ba24f4160b587882134f;hb=92ae11bd3b5e95ff837f98463931e7772c455ad3;hp=c08d54a4713ad3c696640ee5e1542f651f189040;hpb=b485fac33ef961fb5725f3ae34520ee3b2f0339b;p=oweals%2Fminetest.git diff --git a/src/settings.h b/src/settings.h index c08d54a47..b95fbd184 100644 --- a/src/settings.h +++ b/src/settings.h @@ -145,11 +145,7 @@ public: { std::ifstream is(filename); if(is.good() == false) - { - errorstream<<"Error opening configuration file \"" - < &allowed_options) { + int nonopt_index = 0; int i=1; for(;;) { @@ -342,6 +339,15 @@ public: std::string argname = argv[i]; if(argname.substr(0, 2) != "--") { + // If option doesn't start with -, read it in as nonoptX + if(argname[0] != '-'){ + std::string name = "nonopt"; + name += itos(nonopt_index); + set(name, argname); + nonopt_index++; + i++; + continue; + } errorstream<<"Invalid command-line parameter \"" < expected."<