Closed chewi closed 4 years ago
That's strange, because it should be fine already. Your fix will break it for IPv6 addresses. Can you tell me full command line input what did you try to use?
I was trying mono Jazz2.exe /connect:SOMEHOST:7777
.
args[i].LastIndexOf(':', 10)
searches backwards from index 10, which is O
in this case. Maybe it should be 9? That aside, it returns 8, the index of the first :
.
It then tries to parse a number from args[i].Substring(idx + 1)
, which is SOMEHOST:7777
in this case. That fails so it gives up.
It looked very much like you meant to use args[i].IndexOf(':', 10)
because that searches forwards instead and hence returns 17, the index of the second :
. The number is then parsed from just 7777
.
If you want to to work for IPv6 then you'll have to chop off the leading /connect:
first.
Ah, sorry, I forgot how LastIndexOf
works. Should be fixed now.
Thanks! And just to let you know, the packages are in Gentoo now. :grinning:
Great, thanks! Can you tell me where I can find it?
I tried to connect to my own private server but it was just ignoring the
/connect
arg. I eventually figured out why!While on the subject, I've noticed that if you try to connect to a non-existent server, you just end up with a horribly glitchy window.