diff mbox

[edid-decode,3/3] Print the correct VIC number next to the mode

Message ID 1380281221-2116-3-git-send-email-thomas.wood@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Wood Sept. 27, 2013, 11:27 a.m. UTC
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 edid-decode.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox

Patch

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";