SITL: correct buffer over-read in GPS lag simulation

This commit is contained in:
Peter Barker 2021-10-14 11:23:43 +11:00 committed by Peter Barker
parent 6c16da21c5
commit 06c3290e15
1 changed files with 1 additions and 1 deletions

View File

@ -1108,7 +1108,7 @@ void GPS::update()
// add in some GPS lag
_gps_data[next_index++] = d;
if (next_index >= delay+1) {
if (next_index >= delay) {
next_index = 0;
}