diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-05-10 18:27:14 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-05-10 18:27:59 +0100 |
commit | 1e740411ea92549eba56057f47c4572da41a8b23 (patch) | |
tree | 828f7a117458843121dbaa0b3a5a8eb108f86fc6 /tools/intel_error_decode.c | |
parent | 959b0c2d4a9b0b04da6f0bf26c881cc6c7006e8c (diff) |
intel_error_decode: Fix off-by-one when dumping the binary objects
Include the last line to show the last bytes, important when looking for
overflows!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/intel_error_decode.c')
-rw-r--r-- | tools/intel_error_decode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index e05b6b01..6d07ce88 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -460,7 +460,7 @@ static void decode(struct drm_intel_decode *ctx, *count); drm_intel_decode(ctx); } else { - for (int i = 0; i + 4 < *count; i += 4) + for (int i = 0; i + 4 <= *count; i += 4) printf("[%04x] %08x %08x %08x %08x\n", 4*i, data[i], data[i+1], data[i+2], data[i+3]); } |