[PATCH 23/27] edid-decode: allow the year to be one year in the future

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


From: Hans Verkuil <hansverk at cisco.com>

Prototypes may have a year that is in the future, so give this a bit more
slack.

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 ea443259..5a5fb5bd 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -2192,7 +2192,7 @@ int main(int argc, char **argv)
 	    if (edid[0x10] == 0xff) {
 		has_valid_year = 1;
 		printf("Model year %hd\n", edid[0x11] + 1990);
-	    } else if (edid[0x11] + 90 <= ptm->tm_year) {
+	    } else if (edid[0x11] + 90 <= ptm->tm_year + 1) {
 		has_valid_year = 1;
 		if (edid[0x10])
 			printf("Made in week %hd of %hd\n", edid[0x10], edid[0x11] + 1990);
-- 
2.14.1



More information about the xorg-devel mailing list