Fix command line parsing
authorKahrl <kahrl@gmx.net>
Mon, 22 Sep 2014 09:02:26 +0000 (11:02 +0200)
committerKahrl <kahrl@gmx.net>
Mon, 22 Sep 2014 09:02:26 +0000 (11:02 +0200)
Broken by 6bc4cad0eddd7a7cf593ca1471599e2d75727379, e.g.
  minetest --worldname world
would be parsed as
  minetest --worldname --worldname

src/settings.cpp

index 760f07e210a38f63e09f13108ac4eeffe8a0cd32..ca0775330414b8b4a62ab88a791897d340caecc3 100644 (file)
@@ -215,7 +215,7 @@ bool Settings::parseCommandLine(int argc, char *argv[],
                                                << name << "\": missing value" << std::endl;
                                return false;
                        }
-                       value = argv[i++];
+                       value = argv[++i];
                }
 
                set(name, value);