From a58a2dc58b0b521bb6e41c82df8c8cfe79138563 Mon Sep 17 00:00:00 2001 From: SteelT Date: Mon, 19 Apr 2021 01:21:06 -0400 Subject: [PATCH] Fix crash accessing array index out of bounds --- src/k_kart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 5a655fceb..e86e4f871 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3836,7 +3836,7 @@ void K_SpawnSparkleTrail(mobj_t *mo) INT32 i; UINT8 invanimnum; // Current sparkle animation number INT32 invtime;// Invincibility time left, in seconds - UINT8 index = 1; + UINT8 index = 0; fixed_t newx, newy, newz; I_Assert(mo != NULL); @@ -3850,7 +3850,7 @@ void K_SpawnSparkleTrail(mobj_t *mo) } if (leveltime & 2) - index = 2; + index = 1; invtime = mo->player->kartstuff[k_invincibilitytimer]/TICRATE+1;