DyeColorIdMap: fixed uninitialized offset error on invalid dye colours

This commit is contained in:
Dylan K. Taylor 2022-08-26 18:56:22 +01:00
parent 5779622235
commit 08b9495bce
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -74,7 +74,7 @@ final class DyeColorIdMap{
}
public function fromId(int $id) : ?DyeColor{
return $this->idToEnum[$id];
return $this->idToEnum[$id] ?? null;
}
public function fromInvertedId(int $id) : ?DyeColor{