Amend 101744b8
, allow when
and start
to point to the same variable
This commit is contained in:
parent
3851a93e39
commit
c2ce0bcb4a
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user