diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-02 05:10:29 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-02 05:10:29 +0000 |
commit | 412da37667cc06fd16b1e28b1b5f20e9a467de8f (patch) | |
tree | e3711b6a7883edf6988c7a33d1932d05c9147cc7 /monitor-parse-edid | |
parent | 423de7f72b60fe852c7b07ad80b80b8fcb47880a (diff) | |
download | monitor-edid-412da37667cc06fd16b1e28b1b5f20e9a467de8f.tar monitor-edid-412da37667cc06fd16b1e28b1b5f20e9a467de8f.tar.gz monitor-edid-412da37667cc06fd16b1e28b1b5f20e9a467de8f.tar.bz2 monitor-edid-412da37667cc06fd16b1e28b1b5f20e9a467de8f.tar.xz monitor-edid-412da37667cc06fd16b1e28b1b5f20e9a467de8f.zip |
Add handling of EDID extension blocks.
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-x | monitor-parse-edid | 4 |
1 files changed, 2 insertions, 2 deletions
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"); |