aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blackbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blackbox.c b/blackbox.c
index 7918c53..c93678a 100644
--- a/blackbox.c
+++ b/blackbox.c
@@ -1067,10 +1067,10 @@ static game_state *execute_move(const game_state *from, const char *move)
case 'F':
sscanf(move+1, "%d", &rangeno);
- if (ret->exits[rangeno] != LASER_EMPTY)
- goto badmove;
if (!RANGECHECK(ret, rangeno))
goto badmove;
+ if (ret->exits[rangeno] != LASER_EMPTY)
+ goto badmove;
fire_laser(ret, rangeno);
break;