Fix test for capability sweep in shp_hit_mine()
Bogus array index, unpredictable result, can crash the server. Broken in commitef7ea893
, v4.3.24. (cherry picked from commit054eba7a1d
)
This commit is contained in:
parent
e0b21266ce
commit
b62025e82c
1 changed files with 1 additions and 1 deletions
|
@ -708,7 +708,7 @@ shp_hit_mine(struct shpstr *sp)
|
|||
nreport(sp->shp_own, N_HIT_MINE, 0, 1);
|
||||
|
||||
m = MINE_DAMAGE();
|
||||
if (mchr[sp->shp_uid].m_flags & M_SWEEP)
|
||||
if (mchr[sp->shp_type].m_flags & M_SWEEP)
|
||||
m /= 2.0;
|
||||
|
||||
shipdamage(sp, ldround(m, 1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue