Skip to content

Commit

Permalink
limit name length to 12 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarewk committed Oct 17, 2023
1 parent b681133 commit 935ba9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modeline2edid
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ template-S() {

local name="${1//\"}"
[[ -z "$name" ]] && echo "Could not parse modeline: $@" >&2 && return 1
[[ "${#name}" -le 12 ]] && echo "Name cannot be longer than 12 characters: $name is ${#name} characters long" >&2 && return 1
local fn="${name}.S"

local -F pixel_clock_mhz=$2
Expand Down Expand Up @@ -60,7 +61,7 @@ template-S() {
case $ratio in
compute)
ratio=$(find-supported-ratio $hdisp $vdisp 'UNKNOWN')
printf 'Computed ratio: %s' $ratio
printf 'Computed ratio: %s\n' $ratio
[[ $ratio != 'UNKNOWN' ]] || return 1
;;
esac
Expand Down

0 comments on commit 935ba9c

Please sign in to comment.