battle-engine: fix acupressure crash (#381)

- fixes #380

Co-authored-by: SBird <sbird@no.tld>
This commit is contained in:
Philipp AUER 2020-05-24 10:03:52 +02:00 committed by GitHub
parent 12b08670f1
commit de6811b85e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7001,7 +7001,7 @@ static void Cmd_various(void)
u32 statId;
do
{
statId = (Random() % NUM_BATTLE_STATS) + 1;
statId = (Random() % (NUM_BATTLE_STATS - 1)) + 1;
} while (!(bits & gBitTable[statId]));
SET_STATCHANGER(statId, 2, FALSE);