aboutsummaryrefslogtreecommitdiff
path: root/src/servermain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/servermain.cpp')
-rw-r--r--src/servermain.cpp4
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");
}