From 9a452deb146d5abee9c6cfcdeebb76c3a2cb4da2 Mon Sep 17 00:00:00 2001 From: D8H Date: Tue, 16 Jan 2024 00:22:11 +0100 Subject: [PATCH] [Reviewed] [Marching squares] Fix a crash in the "point is inside" condition (#1140) --- extensions/reviewed/MarchingSquares.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/reviewed/MarchingSquares.json b/extensions/reviewed/MarchingSquares.json index f75dfb6a..8a69bda5 100644 --- a/extensions/reviewed/MarchingSquares.json +++ b/extensions/reviewed/MarchingSquares.json @@ -8,7 +8,7 @@ "name": "MarchingSquares", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/peanut-outline.svg", "shortDescription": "Allow to build a \"scalar field\" and draw contour lines of it: useful for fog of wars, liquid effects, paint the ground, etc...", - "version": "0.5.3", + "version": "0.5.4", "description": [ "It can be helpful for:", " * Liquid effects like water, blobs or lava ([open the project online](https://editor.gdevelop.io/?project=example://marching-squares-liquids))", @@ -353,8 +353,8 @@ " var squareY = Math.floor(y);", " if (squareX < 0 ||", " squareY < 0 ||", - " squareX >= this.dimX() ||", - " squareY >= this.dimY()) {", + " squareX >= this.dimX() - 1 ||", + " squareY >= this.dimY() - 1) {", " return 0;", " }", " // Extrapolate",