fixed memory leak

fixed trying to draw out of bounds
This commit is contained in:
2025-04-27 14:00:54 +02:00
parent 4ce265e722
commit 2cd6a757dc
2 changed files with 3 additions and 2 deletions

View File

@@ -138,9 +138,9 @@ public class Level {
// ignore everything outside
if (chunkX < 0) continue;
if (chunkX > chunksPerX) continue;
if (chunkX >= chunksPerX) continue;
if (chunkY < 0) continue;
if (chunkY > chunksPerY) continue;
if (chunkY >= chunksPerY) continue;
chunks[chunkX, chunkY].WritePixel<T>(ptX, ptY);
}