summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/mines.c
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2020-06-25 14:44:33 -0400
committerFranklin Wei <franklin@rockbox.org>2020-06-25 18:45:58 +0000
commit48b0ef1cf22ec37927116ac83ea7c7cfc1f9083e (patch)
tree148ced6ae04e578abc38a38e92879fa13b97a604 /apps/plugins/puzzles/src/mines.c
parentdd3a8e08988308cf88c10a44176d83a8a152ec4a (diff)
downloadrockbox-48b0ef1cf22ec37927116ac83ea7c7cfc1f9083e.tar.gz
rockbox-48b0ef1cf22ec37927116ac83ea7c7cfc1f9083e.zip
puzzles: resync with upstream
This brings the upstream version to 9aa7b7c (with some of my changes as well). Change-Id: I5bf8a3e0b8672d82cb1bf34afc07adbe12a3ac53
Diffstat (limited to 'apps/plugins/puzzles/src/mines.c')
-rw-r--r--apps/plugins/puzzles/src/mines.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/src/mines.c b/apps/plugins/puzzles/src/mines.c
index c9d9852573..ae717d3f37 100644
--- a/apps/plugins/puzzles/src/mines.c
+++ b/apps/plugins/puzzles/src/mines.c
@@ -258,6 +258,8 @@ static const char *validate_params(const game_params *params, bool full)
258 */ 258 */
259 if (full && params->unique && (params->w <= 2 || params->h <= 2)) 259 if (full && params->unique && (params->w <= 2 || params->h <= 2))
260 return "Width and height must both be greater than two"; 260 return "Width and height must both be greater than two";
261 if (params->n < 0)
262 return "Mine count may not be negative";
261 if (params->n > params->w * params->h - 9) 263 if (params->n > params->w * params->h - 9)
262 return "Too many mines for grid size"; 264 return "Too many mines for grid size";
263 if (params->n < 1) 265 if (params->n < 1)