(ac_flak_dam): Fix FLAK_MAX to be last element of the array.
This fixes >8 case which was accessing one past the last element of the array and getting an invalid value for flak max. Broken in rev. 1.18
This commit is contained in:
parent
c3900f8424
commit
9fcb96e010
1 changed files with 1 additions and 1 deletions
|
@ -992,7 +992,7 @@ ac_flak_dam(int flak)
|
||||||
0.35f, 0.40f, 0.45f, 0.50f, 0.50f, 0.55f, 0.60f, 0.65f,
|
0.35f, 0.40f, 0.45f, 0.50f, 0.50f, 0.55f, 0.60f, 0.65f,
|
||||||
/* +5 +6 +7 +8 >+8 */
|
/* +5 +6 +7 +8 >+8 */
|
||||||
0.70f,0.75f, 0.80f, 0.85f, 1.1305f };
|
0.70f,0.75f, 0.80f, 0.85f, 1.1305f };
|
||||||
enum { FLAK_MAX = sizeof(flaktable)/sizeof(flaktable[0]) };
|
enum { FLAK_MAX = sizeof(flaktable)/sizeof(flaktable[0]) - 1 };
|
||||||
|
|
||||||
if (flak > 8)
|
if (flak > 8)
|
||||||
mult = flaktable[FLAK_MAX];
|
mult = flaktable[FLAK_MAX];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue