diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-22 17:58:02 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-22 17:58:02 +0200 |
commit | 58ccc68c81b62e3826a7367c38871324ce1eab86 (patch) | |
tree | 11645247bf3557692514f1fa46cfa6c8fa5b4065 /src/servermain.cpp | |
parent | 3de176cc587c4e0601c3c3f5a049e30db6bd2c17 (diff) | |
download | minetest-58ccc68c81b62e3826a7367c38871324ce1eab86.tar.gz minetest-58ccc68c81b62e3826a7367c38871324ce1eab86.tar.bz2 minetest-58ccc68c81b62e3826a7367c38871324ce1eab86.zip |
server starting on port 0 on invalid settings
Diffstat (limited to 'src/servermain.cpp')
-rw-r--r-- | src/servermain.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/servermain.cpp b/src/servermain.cpp index 0c2faa7ec..24d3b24e8 100644 --- a/src/servermain.cpp +++ b/src/servermain.cpp @@ -277,11 +277,11 @@ int main(int argc, char *argv[]) // Port? u16 port = 30000; - if(cmd_args.exists("port")) + if(cmd_args.exists("port") && cmd_args.getU16("port") != 0) { port = cmd_args.getU16("port"); } - else if(g_settings.exists("port")) + else if(g_settings.exists("port") && g_settings.getU16("port") != 0) { port = g_settings.getU16("port"); } |