Quote:
FYI, an easier way to calculate with any large port number would be:

$calc(%port % 65535)

e.g. $calc(765567 % 65535)
That should return: 44671


Actually, it returns 44682 smile

You need to use 65536, not 65535.