Signed-off-by: Thomas Wood <thomas.wood@xxxxxxxxx> --- edid-decode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/edid-decode.c b/edid-decode.c index b710bb5..4265843 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -715,10 +715,11 @@ cea_video_block(unsigned char *x) unsigned char vic = x[i] & 0x7f; unsigned char native = x[i] & 0x80; const char *mode; + int index; - vic--; - if (vic < ARRAY_SIZE(edid_cea_modes)) - mode = edid_cea_modes[vic]; + index = vic - 1; + if (index < ARRAY_SIZE(edid_cea_modes)) + mode = edid_cea_modes[index]; else mode = "Unknown mode"; -- 1.8.3.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel