RegionLoader: fix off-by-one bug with large chunks, closes #2615

This commit is contained in:
Dylan K. Taylor
2018-12-29 00:02:54 +00:00
parent 0eef634aab
commit beb5d72299
2 changed files with 53 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class RegionLoader{
public const COMPRESSION_GZIP = 1;
public const COMPRESSION_ZLIB = 2;
public const MAX_SECTOR_LENGTH = 256 << 12; //256 sectors, (1 MiB)
public const MAX_SECTOR_LENGTH = 255 << 12; //255 sectors (~0.996 MiB)
public const REGION_HEADER_LENGTH = 8192; //4096 location table + 4096 timestamps
public static $COMPRESSION_LEVEL = 7;