[PATCH 22/27] edid-decode: allow for comma separated hex values

Hans Verkuil hverkuil at xs4all.nl
Thu Aug 31 11:41:15 UTC 2017


From: Hans Verkuil <hansverk at cisco.com>

Useful when the hex dump comes from source code.

Signed-off-by: Hans Verkuil <hansverk at cisco.com>
---
 edid-decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/edid-decode.c b/edid-decode.c
index d38d2a3d..ea443259 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -1976,7 +1976,7 @@ extract_edid(int fd)
     }
 
     /* Is the EDID provided in hex? */
-    for (i = 0; i < 32 && (isspace(ret[i]) || tolower(ret[i]) == 'x' || isxdigit(ret[i])); i++);
+    for (i = 0; i < 32 && (isspace(ret[i]) || ret[i] == ',' || tolower(ret[i]) == 'x' || isxdigit(ret[i])); i++);
     if (i == 32) {
 	out = malloc(size >> 1);
 	if (out == NULL) {
-- 
2.14.1



More information about the xorg-devel mailing list