13
0

possible fix for a valgrind reported illegal read

This commit is contained in:
Paul Davis 2022-01-24 16:34:15 -07:00
parent 5f3cd26d02
commit b7769a8f4b

View File

@ -1789,9 +1789,9 @@ TempoMap::_get_tempo_and_meter (typename const_traits_t::tempo_point_type & tp,
p = last_used; p = last_used;
if (can_match) { if (can_match) {
while (((*p).*method)() <= arg && p != endi) ++p; while ((p != endi) && ((*p).*method)() <= arg) ++p;
} else { } else {
while (((*p).*method)() < arg && p != endi) ++p; while ((p != endi) && ((*p).*method)() < arg) ++p;
} }
return p; return p;