mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 03:35:33 +00:00
Added another place where the same happens
This commit is contained in:
parent
4f47dac8ec
commit
59e9446fe5
@ -247,7 +247,8 @@ class RegionLoader{
|
|||||||
$chunk = Binary::writeInt(strlen($chunk)) . $chunk;
|
$chunk = Binary::writeInt(strlen($chunk)) . $chunk;
|
||||||
$sectors = (int) ceil(strlen($chunk) / 4096);
|
$sectors = (int) ceil(strlen($chunk) / 4096);
|
||||||
if($sectors > $this->locationTable[$i][1]){
|
if($sectors > $this->locationTable[$i][1]){
|
||||||
$this->locationTable[$i][0] = $this->lastSector += $sectors;
|
$this->locationTable[$i][0] = $this->lastSector + 1;
|
||||||
|
$this->lastSector += $sectors;
|
||||||
}
|
}
|
||||||
fseek($this->filePointer, $this->locationTable[$i][0] << 12);
|
fseek($this->filePointer, $this->locationTable[$i][0] << 12);
|
||||||
fwrite($this->filePointer, str_pad($chunk, $sectors << 12, "\x00", STR_PAD_RIGHT));
|
fwrite($this->filePointer, str_pad($chunk, $sectors << 12, "\x00", STR_PAD_RIGHT));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user