From d07293af9f8d726d4b55360e57933b74d3221928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alve=20Svar=C3=A9n?= Date: Fri, 9 Oct 2020 18:58:19 +0200 Subject: [PATCH] Port max value was incorrect --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 9d17608..40e5fa8 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ def gen_file(region_name: str, ip_address: str = "127.0.0.1", port: int = 22023) raise ValueError("Region name too long") if (len(ip_address) > 0xff): raise ValueError("IP-address too long") - if (port > 0xffff * 5): + if (port > 0x7fff): raise ValueError("Port too high") # Append region name