aboutsummaryrefslogtreecommitdiffstats
path: root/monitor-parse-edid
diff options
context:
space:
mode:
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-xmonitor-parse-edid4
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");