aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-02-05 00:05:58 -0500
committerkwolekr <kwolekr@minetest.net>2014-02-05 00:05:58 -0500
commitc6c5edd73a97f2991113ba48d9c2415222fe4709 (patch)
treee894c58afc17bf475bcfb9ced574a0b02b0fa7d7 /src/main.cpp
parent7859e57f6c4bafe6d9213be905b16cc3e015ee07 (diff)
downloadminetest-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.cpp7
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;