diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index 564c161..680f74d 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -1076,11 +1076,17 @@ final class Binkp extends BaseProtocol } elseif (! strncmp($buf,'VER ',4)) { $data = $this->skip_blanks(substr($buf,4)); $matches = []; - preg_match('#^(.+)\s+binkp/([0-9]+)\.([0-9]+)$#',$data,$matches); + preg_match('#^(.+)\s+\(?binkp/([0-9]+)\.([0-9]+)\)?$#',$data,$matches); - $this->node->software = $matches[1]; - $this->node->ver_major = $matches[2]; - $this->node->ver_minor = $matches[3]; + if (count($matches) === 4) { + $this->node->software = $matches[1]; + $this->node->ver_major = $matches[2]; + $this->node->ver_minor = $matches[3]; + } else { + $this->node->software = 'Unknown'; + $this->node->ver_major = 0; + $this->node->ver_minor = 0; + } } elseif (! strncmp($buf,'TRF ',4)) { $data = $this->skip_blanks(substr($buf,4));