BUGFIX: fixed undefined offset

This commit is contained in:
Jeroen De Meerleer 2022-04-13 15:55:37 +02:00
parent ce53df5328
commit df71cc208d
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": "^7.1",
"php": "^7.1 || ^8.0",
"myclabs/php-enum": "^1.7",
"ext-iconv": "*"
},

View File

@ -461,8 +461,8 @@ class Pairtwo6 implements ReaderInterface
$offset += $length;
$length = 1;
$player->Category =
$this->Tournament->Categories[ $this->readData('Int', substr($swscontents, $offset, $length)) - 1 ];
$categoryindex = $this->readData('Int', substr($swscontents, $offset, $length));
$player->Category = $categoryindex != 0 ? $this->Tournament->Categories[ $categoryindex ] : NULL;
$offset += $length;
$length = 1;