Fix bound check using constant value

It should use the actual count instead!
This commit is contained in:
Paul van Tilburg 2022-03-07 19:19:08 +01:00
parent 65a4420191
commit 738409c3a8
Signed by untrusted user: paul
GPG Key ID: C6DE073EDA9EEC4D
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ fn map_at(
let duration = instant.signed_duration_since(maps_stamp);
let offset = (duration.num_seconds() / interval) as u32;
// Check if out of bounds.
if offset >= UVI_MAP_COUNT {
if offset >= count {
return None;
}
let width = maps.width() / count;