mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -05:00
Fixed possible crash when placing tiles outside of map (#453)
This commit is contained in:
parent
162252e82d
commit
6778658606
@ -314,7 +314,7 @@ func areaEmpty(mapEngine *d2mapengine.MapEngine, rect d2common.Rectangle) bool {
|
|||||||
mapHeight := mapEngine.Size().Height
|
mapHeight := mapEngine.Size().Height
|
||||||
mapWidth := mapEngine.Size().Width
|
mapWidth := mapEngine.Size().Width
|
||||||
|
|
||||||
if rect.Bottom() >= mapHeight || rect.Right() >= mapWidth {
|
if rect.Top < 0 || rect.Left < 0 || rect.Bottom() >= mapHeight || rect.Right() >= mapWidth {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user