From 1e740411ea92549eba56057f47c4572da41a8b23 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 10 May 2017 18:27:14 +0100 Subject: 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 --- tools/intel_error_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/intel_error_decode.c') 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]); } -- cgit v1.2.3