From 4a47b2ab3557fb5907c92abe95b0ad7ed9fc6c74 Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Wed, 10 Jun 2020 19:31:20 +0200 Subject: [PATCH] dont draw outsite the image --- src/BasicPathFinding.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BasicPathFinding.cs b/src/BasicPathFinding.cs index f9064ec..aecda66 100644 --- a/src/BasicPathFinding.cs +++ b/src/BasicPathFinding.cs @@ -173,7 +173,7 @@ namespace OpenSim.Modules.PathFinding { for (int Y = (int)_start.Y; Y < (int)_end.Y; Y++) { - if(Y >= 0 && Y >= 0) + if(Y >= 0 && Y >= 0 && X > _map.Size.Height && Y > _map.Size.Width) _map.SetPixel(X, Y, _color); } }