From 412da37667cc06fd16b1e28b1b5f20e9a467de8f Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sat, 2 Jan 2010 05:10:29 +0000 Subject: Add handling of EDID extension blocks. --- monitor-parse-edid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'monitor-parse-edid') diff --git a/monitor-parse-edid b/monitor-parse-edid index a033c35..68fb32b 100755 --- a/monitor-parse-edid +++ b/monitor-parse-edid @@ -487,7 +487,7 @@ sub print_edid { sub edid_from_lines { my (@l) = @_; my $edid_str = join('', map { /\s+([0-9a-f]{32})$/ && $1 } @l); - length($edid_str) == 256 or return (); + length($edid_str) % (2 * 128) == 0 or return (); pack("C*", map { hex($_) } $edid_str =~ /(..)/g); } @@ -536,7 +536,7 @@ sub error { } my @raw_edids; -if (length($input) == 128 || length($input) == 256) { +if (length($input) % 128 == 0 && length($input) <= 128 * 254) { @raw_edids = $input; } else { @raw_edids = find_edid_in_string($input) or error("bad edid"); -- cgit v1.2.1