mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-09-20 04:48:38 +02:00
Fixed error with determining invalid IP address
This commit is contained in:
parent
b43ad2f044
commit
6582026557
@ -32,9 +32,9 @@ createRandomByte = function() {
|
||||
}
|
||||
|
||||
isValidIPAddress = function(ipaddress) {
|
||||
if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ipaddress))
|
||||
if (/^(25[0-6]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-6]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-6]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-6]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ipaddress))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false ;
|
||||
return false;
|
||||
}
|
Loading…
Reference in New Issue
Block a user