diff --git a/Client/ULandscape.pas b/Client/ULandscape.pas index 5db0e9c..aa1cd5f 100644 --- a/Client/ULandscape.pas +++ b/Client/ULandscape.pas @@ -1327,6 +1327,10 @@ begin y1 := AStream.ReadWord; x2 := AStream.ReadWord; y2 := AStream.ReadWord; + if (x1 >= FCellWidth) or (y1 >= FCellHeight) then + Continue; + if x2 >= FCellWidth then x2 := FCellWidth - 1; + if y2 >= FCellHeight then y2 := FCellHeight - 1; for cellX := x1 to x2 do for cellY := y1 to y2 do FWriteMap[cellX * FCellHeight + cellY] := True;