diff options
author | kwolekr <kwolekr@minetest.net> | 2014-02-05 00:05:58 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-02-05 00:05:58 -0500 |
commit | c6c5edd73a97f2991113ba48d9c2415222fe4709 (patch) | |
tree | e894c58afc17bf475bcfb9ced574a0b02b0fa7d7 /src/main.cpp | |
parent | 7859e57f6c4bafe6d9213be905b16cc3e015ee07 (diff) | |
download | minetest-c6c5edd73a97f2991113ba48d9c2415222fe4709.tar.gz minetest-c6c5edd73a97f2991113ba48d9c2415222fe4709.tar.bz2 minetest-c6c5edd73a97f2991113ba48d9c2415222fe4709.zip |
Revert "Fix settings to honor numeric conversion errors"
This reverts commit 3f376a092e1c16429fb52f24736e9da98aff4cd5.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index c90e6fde3..8186e26c8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1671,10 +1671,9 @@ int main(int argc, char *argv[]) //infostream<<"Main: password hash: '"<<password<<"'"<<std::endl; address = menudata.address; - try { - port = stoi(menudata.port); - } - catch (NumericException&e) {} + int newport = stoi(menudata.port); + if(newport != 0) + port = newport; simple_singleplayer_mode = menudata.simple_singleplayer_mode; |