fixed bug found by Lars Poeschel, contest.to = -1 hasend been checked right in do_contest

origin
stpohle 18 years ago
parent 9e3e86249d
commit 855361caf3

@ -247,13 +247,13 @@ do_contest (struct pkg_contest *ct_pkg, _net_addr * addr)
if (GT_MP_PTPM) { if (GT_MP_PTPM) {
if ((ct_pkg->from < 0 || ct_pkg->from >= MAX_PLAYERS if ((ct_pkg->from < 0 || ct_pkg->from >= MAX_PLAYERS
|| ct_pkg->to < -1 || ct_pkg->to >= MAX_PLAYERS || ct_pkg->to < -1 || ct_pkg->to >= MAX_PLAYERS
|| addr->pl_nr != ct_pkg->from) { || addr->pl_nr != ct_pkg->from)) {
d_printf (" from or to value out of range (0-MAX_PLAYERS)\n"); d_printf (" from or to value out of range (0-MAX_PLAYERS)\n");
return; return;
} }
/* ignore packet it's just a workaround for /* ignore packet it's just a workaround for
* some hardware router */ * some hardware router */
if ((ct_pkg->to == -1) return; if (ct_pkg->to == -1) return;
players[ct_pkg->to].net.flags &= (0xFF - NETF_firewall); players[ct_pkg->to].net.flags &= (0xFF - NETF_firewall);
net_game_send_player (ct_pkg->to); net_game_send_player (ct_pkg->to);

Loading…
Cancel
Save