diff options
Diffstat (limited to 'src/gallium/tools/trace/dump_state.py')
-rwxr-xr-x | src/gallium/tools/trace/dump_state.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/tools/trace/dump_state.py b/src/gallium/tools/trace/dump_state.py index 5257100da5..bde00ec999 100755 --- a/src/gallium/tools/trace/dump_state.py +++ b/src/gallium/tools/trace/dump_state.py @@ -474,7 +474,10 @@ class Context(Dispatcher): indices = [] for i in xrange(info.start, info.start + count): offset = self._state.index_buffer.offset + i*index_size - index, = unpack_from(format, data, offset) + if offset + index_size > len(data): + index = 0 + else: + index, = unpack_from(format, data, offset) indices.append(index) min_index = min(min_index, index) max_index = max(max_index, index) |