Skip to content

Commit

Permalink
DyeColorIdMap: fixed uninitialized offset error on invalid dye colours
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Aug 26, 2022
1 parent 5779622 commit 08b9495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/bedrock/DyeColorIdMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function toInvertedId(DyeColor $color) : int{
}

public function fromId(int $id) : ?DyeColor{
return $this->idToEnum[$id];
return $this->idToEnum[$id] ?? null;
}

public function fromInvertedId(int $id) : ?DyeColor{
Expand Down

0 comments on commit 08b9495

Please sign in to comment.