diff --git a/src/game/bondmove.c b/src/game/bondmove.c index ede1b11d0..400cfa00c 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -907,7 +907,9 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i aimoffhist[i] = !aimonhist[i]; } - g_Vars.currentplayer->insightaimmode = aimonhist[numsamples - 1]; + if (numsamples > 0) { + g_Vars.currentplayer->insightaimmode = aimonhist[numsamples - 1]; + } } if (!lvIsPaused()) { @@ -1238,7 +1240,9 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i aimoffhist[i] = !aimonhist[i]; } - g_Vars.currentplayer->insightaimmode = aimonhist[numsamples - 1]; + if (numsamples > 0) { + g_Vars.currentplayer->insightaimmode = aimonhist[numsamples - 1]; + } } if (!lvIsPaused()) {