mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +00:00
RegionLocationTableEntry: require sector count to be at least 1
This commit is contained in:
parent
6bf840c72e
commit
22f25dfbdb
@ -42,8 +42,8 @@ class RegionLocationTableEntry{
|
|||||||
throw new \InvalidArgumentException("Start sector must be positive, got $firstSector");
|
throw new \InvalidArgumentException("Start sector must be positive, got $firstSector");
|
||||||
}
|
}
|
||||||
$this->firstSector = $firstSector;
|
$this->firstSector = $firstSector;
|
||||||
if($sectorCount < 0 or $sectorCount > 255){
|
if($sectorCount < 1 or $sectorCount > 255){
|
||||||
throw new \InvalidArgumentException("Sector count must be in range 0...255, got $sectorCount");
|
throw new \InvalidArgumentException("Sector count must be in range 1...255, got $sectorCount");
|
||||||
}
|
}
|
||||||
$this->sectorCount = $sectorCount;
|
$this->sectorCount = $sectorCount;
|
||||||
$this->timestamp = $timestamp;
|
$this->timestamp = $timestamp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user