Commit Diff


commit - 9759434e28db896a49f4be1e1f09c55ae4231a91
commit + 1ead39e269aa3af62cd0f416bd6fb7c5b9b77378
blob - d6ef83867a380123689f272d77b2a7cabcf0c8ea
blob + 084a1e758ddcc3d0f5c6b12b11b5106cdbacb29f
--- FICS/playerdb.c
+++ FICS/playerdb.c
@@ -327,6 +327,11 @@ player_remove(int p)
 {
 	int i;
 
+	if (!player_num_ok_chk(p)) {
+		warnx("%s: invalid player number %d", __func__, p);
+		return -1;
+	}
+
 	player_decline_offers(p, -1, -1);
 	player_withdraw_offers(p, -1, -1);