robocode-dev / tank-royale

Git repository for Robocode Tank Royale
Apache License 2.0
122 stars 23 forks source link

Server is not accepting the full range of ports #66

Closed SirStone closed 1 year ago

SirStone commented 1 year ago

Describe the bug The range ports for a standard computer is 1-65535 but the server uses a Short to store the port so the port can't have a port over the maximum positive short, that is 32767, leaving out 65535-32767=32768 unusable ports

To Reproduce FAIL launch the server with the maximum short+1=32768 and it will fail wiht the message "Invalid value for option '--port': '32768' is not a short" java -jar robocode-tankroyale-server-0.19.1.jar --botSecrets veuogdpgjtd --controllerSecrets ifrafjbrpcg --port 32768

NO FAIL launch the server with the maximum short = 32767 and the server will start ok java -jar robocode-tankroyale-server-0.19.1.jar --botSecrets veuogdpgjtd --controllerSecrets ifrafjbrpcg --port 32767

Expected behavior The server should be able to use any port out of the full range

Screenshots Screenshot 2023-03-26 at 11 34 16

flemming-n-larsen commented 1 year ago

@SirStone Thank you for reporting this. I will fix it ASAP.

flemming-n-larsen commented 1 year ago

Fixed with the 0.19.2 release