Fix test for capability engineer in lnd_hit_mine()

Bogus array index, unpredictable result, can crash the server.  Broken
in commit ef7ea893, v4.3.24.
This commit is contained in:
Markus Armbruster 2010-04-07 23:35:25 +02:00
parent 72b31dae13
commit 7506039f1b

View file

@ -862,7 +862,7 @@ lnd_hit_mine(struct lndstr *lp)
nreport(lp->lnd_own, N_LHIT_MINE, 0, 1); nreport(lp->lnd_own, N_LHIT_MINE, 0, 1);
m = MINE_LDAMAGE(); m = MINE_LDAMAGE();
if (lchr[lp->lnd_uid].l_flags & L_ENGINEER) if (lchr[lp->lnd_type].l_flags & L_ENGINEER)
m /= 2; m /= 2;
landdamage(lp, m); landdamage(lp, m);