mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
server starting on port 0 on invalid settings
This commit is contained in:
parent
3de176cc58
commit
58ccc68c81
6 changed files with 35 additions and 10 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue