[warnings] fix integer narrowing

This commit is contained in:
akallabeth 2024-10-03 13:15:24 +02:00
parent 5e6d0a4183
commit 429474cd0f
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -303,7 +303,7 @@ static BOOL transport_default_connect_tls(rdpTransport* transport)
tls->hostname = settings->ServerHostname;
tls->serverName = settings->UserSpecifiedServerName;
tls->port = settings->ServerPort;
tls->port = MIN(UINT16_MAX, settings->ServerPort);
if (tls->port == 0)
tls->port = 3389;