Protect against choices in ms that are too high

This commit is contained in:
Dragon Fire
2021-01-16 13:35:46 -05:00
parent 8c180ad558
commit 49b710aa14
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -48,6 +48,7 @@ module.exports = class MinesweeperCommand extends Command {
if (!coordPicked) return false; if (!coordPicked) return false;
const x = Number.parseInt(coordPicked[1], 10); const x = Number.parseInt(coordPicked[1], 10);
const y = Number.parseInt(coordPicked[2], 10); const y = Number.parseInt(coordPicked[2], 10);
if (x > size || y > size) return false;
if (game.mask[y - 1][x - 1]) return false; if (game.mask[y - 1][x - 1]) return false;
return true; return true;
}; };
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "xiao", "name": "xiao",
"version": "126.3.0", "version": "126.3.1",
"description": "Your personal server companion.", "description": "Your personal server companion.",
"main": "Xiao.js", "main": "Xiao.js",
"scripts": { "scripts": {