mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
Fix off-by-one error in filtered model range reclamping
This commit is contained in:
parent
a8f6481d2b
commit
5f3c94afff
1 changed files with 2 additions and 2 deletions
|
@ -611,7 +611,7 @@ class FilteredLogModel (FilteredLogModelBase):
|
|||
# Identity; there are no filters.
|
||||
start_offset = super_start_offset
|
||||
else:
|
||||
n_filtered = self.__filtered_indices_in_range (old_start, super_start)
|
||||
n_filtered = self.__filtered_indices_in_range (old_start, super_start - 1)
|
||||
assert n_filtered > 0
|
||||
start_offset = n_filtered
|
||||
self.__remove_range (0, start_offset - 1)
|
||||
|
@ -625,7 +625,7 @@ class FilteredLogModel (FilteredLogModelBase):
|
|||
if end > len (self.line_offsets) - 1:
|
||||
raise ValueError ("end value out of range (got %r)" % (end,))
|
||||
if start > end:
|
||||
raise ValueError ("start cannot be greater than end")
|
||||
raise ValueError ("start cannot be greater than end (got %r, %r)" % (start, end,))
|
||||
|
||||
self.logger.debug ("removing line range first = %i, last = %i",
|
||||
start, end)
|
||||
|
|
Loading…
Reference in a new issue