diff --git a/src/serializer/BitSet.php b/src/serializer/BitSet.php index be28d8b4..1e4a3807 100644 --- a/src/serializer/BitSet.php +++ b/src/serializer/BitSet.php @@ -125,7 +125,7 @@ public function write(PacketSerializer $out) : void{ $nextShift = $currentShift + self::SHIFT; if($nextShift >= self::INT_BITS){ $nextShift -= self::INT_BITS; - $bits |= $parts[++$currentIndex] << (self::SHIFT - $nextShift); + $bits |= ($parts[++$currentIndex] ?? 0) << (self::SHIFT - $nextShift); } $currentShift = $nextShift;