From d25c84acff2690b8c8157bec83b23439bea85e7c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 5 Mar 2019 12:09:27 +0000 Subject: [PATCH] Fixed RegionLoader corrupting location table when too-large chunks are discovered this was making the location table point to an offset that did not yet exist, which caused the region header consistency check to discard the region as corrupted the next time it was loaded. --- src/pocketmine/level/format/io/region/RegionLoader.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pocketmine/level/format/io/region/RegionLoader.php b/src/pocketmine/level/format/io/region/RegionLoader.php index 042852c65..c6712b422 100644 --- a/src/pocketmine/level/format/io/region/RegionLoader.php +++ b/src/pocketmine/level/format/io/region/RegionLoader.php @@ -140,8 +140,6 @@ class RegionLoader{ if($length <= 0 or $length > self::MAX_SECTOR_LENGTH){ //Not yet generated / corrupted if($length >= self::MAX_SECTOR_LENGTH){ - $this->locationTable[$index][0] = ++$this->lastSector; - $this->locationTable[$index][1] = 1; throw new CorruptedChunkException("Corrupted chunk header detected (sector count $length larger than max " . self::MAX_SECTOR_LENGTH . ")"); } return null;