aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tents.c b/tents.c
index 5eb34b0..8b93653 100644
--- a/tents.c
+++ b/tents.c
@@ -998,7 +998,7 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
int dy, dx;
bool ok = true;
- which = i + random_upto(rs, j);
+ which = i + random_upto(rs, w*h - i);
tmp = order[which];
order[which] = order[i];
order[i] = tmp;