From 49b710aa14acbfdb08fab0cea44d9c5c367fc49d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 16 Jan 2021 13:35:46 -0500 Subject: [PATCH] Protect against choices in ms that are too high --- commands/games-sp/minesweeper.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/minesweeper.js b/commands/games-sp/minesweeper.js index b1da397c..d6892a0b 100644 --- a/commands/games-sp/minesweeper.js +++ b/commands/games-sp/minesweeper.js @@ -48,6 +48,7 @@ module.exports = class MinesweeperCommand extends Command { if (!coordPicked) return false; const x = Number.parseInt(coordPicked[1], 10); const y = Number.parseInt(coordPicked[2], 10); + if (x > size || y > size) return false; if (game.mask[y - 1][x - 1]) return false; return true; }; diff --git a/package.json b/package.json index e39098fc..f33a1826 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "126.3.0", + "version": "126.3.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {