diff options
author | René Stadler <mail@renestadler.de> | 2008-01-10 14:12:34 +0200 |
---|---|---|
committer | René Stadler <mail@renestadler.de> | 2008-01-10 14:12:34 +0200 |
commit | 94c2b018ce2c82bb50a07584ffaec866fe38cd6b (patch) | |
tree | 4f9a99f9d60f33f1f5e218be8d56ac28e45525ed /GstDebugViewer | |
parent | a4f734f8fd8a91a4a8c0be2aa50c840acc64bb79 (diff) |
Fix off-by-one error in filtered model range reclamping
Diffstat (limited to 'GstDebugViewer')
-rw-r--r-- | GstDebugViewer/GUI.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/GstDebugViewer/GUI.py b/GstDebugViewer/GUI.py index 1440f85..11e55ef 100644 --- a/GstDebugViewer/GUI.py +++ b/GstDebugViewer/GUI.py @@ -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) |