Name with hyphen followed by h or p breaks host/port parsing

Started by habi2, Sep 01, 2025, 01:57 AM

Previous topic - Next topic

habi2

Subject: Name with hyphen followed by h or p breaks host/port parsing


Description
If the player name contains a hyphen (-) followed by h, the hostname gets corrupted when connecting.

If the player name contains a hyphen (-) followed by p, the port number is parsed incorrectly.

This causes the client to fail to connect to the correct server.
Example:

test-hname → wrong hostname

test-pname → wrong port

Reproducible
Always

What you were doing when the bug happened


What you think caused the bug
It seems the parser might be mistaking parts of the name for -h (host) or -p (port) arguments.