aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net.c b/net.c
index 6f7d149..7f90047 100644
--- a/net.c
+++ b/net.c
@@ -1872,6 +1872,8 @@ static unsigned char *compute_active(const game_state *state, int cx, int cy)
active = snewn(state->width * state->height, unsigned char);
memset(active, 0, state->width * state->height);
+ assert(0 <= cx && cx < state->width);
+ assert(0 <= cy && cy < state->height);
/*
* We only store (x,y) pairs in todo, but it's easier to reuse
* xyd_cmp and just store direction 0 every time.