13
0

Amend 101744b8, allow when and start to point to the same variable

This commit is contained in:
Robin Gareus 2023-09-06 01:01:30 +02:00
parent 3851a93e39
commit c2ce0bcb4a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1633,9 +1633,10 @@ Locations::section_at (timepos_t const& when, timepos_t& start, timepos_t& end)
return NULL; return NULL;
} }
Location* rv = NULL; Location* rv = NULL;
timepos_t test = when;
for (auto const& i: locs) { for (auto const& i: locs) {
if (when >= i.first) { if (test >= i.first) {
start = i.first; start = i.first;
rv = i.second; rv = i.second;
} else { } else {