Avoid subtraction of two uint

This commit is contained in:
kamilritz 2020-04-26 17:54:38 +02:00 committed by Mathieu Bresciani
parent 70d65ea55f
commit 8b6d665a13
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ public:
int index = (_head - i);
index = index < 0 ? _size + index : index;
if (timestamp >= _buffer[index].time_us && timestamp - _buffer[index].time_us < (uint64_t)1e5) {
if (timestamp >= _buffer[index].time_us && timestamp < _buffer[index].time_us + (uint64_t)1e5) {
*sample = _buffer[index];
// Now we can set the tail to the item which