Fixed script loading for Turkish locale

This commit is contained in:
Anuken
2021-03-01 11:58:53 -05:00
parent 5f83c92829
commit 8f91576f85
3 changed files with 8 additions and 6 deletions

View File

@@ -570,7 +570,7 @@ public class JoinDialog extends BaseDialog{
if(isIpv6 && ip.lastIndexOf("]:") != -1 && ip.lastIndexOf("]:") != ip.length() - 1){
int idx = ip.indexOf("]:");
this.ip = ip.substring(1, idx);
this.port = Integer.parseInt(ip.substring(idx + 2, ip.length()));
this.port = Integer.parseInt(ip.substring(idx + 2));
}else if(!isIpv6 && ip.lastIndexOf(':') != -1 && ip.lastIndexOf(':') != ip.length() - 1){
int idx = ip.lastIndexOf(':');
this.ip = ip.substring(0, idx);