port: avoid stack corruption in bmoveProcessInput

This commit is contained in:
fgsfds committed 2024-11-14 23:00:30 +01:00
1 parent b88c3a120b
commit 130b286d0d
1 file changed
+6 -2
+6 -2
View File
@@ -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()) {