edid: fix off-by-one error in CEA mode numbering
The CEA extension short video descriptors contain the VIC, which starts at 1, not 0. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
9bd5a198dc
commit
68556d74b4
|
@ -970,8 +970,8 @@ handle_cea_svd(struct cea_video_block *video, void *data)
|
|||
int vid;
|
||||
|
||||
vid = video->video_code & 0x7f;
|
||||
if (vid < CEA_VIDEO_MODES_NUM) {
|
||||
Mode = xf86DuplicateMode(CEAVideoModes + vid);
|
||||
if (vid >= 1 && vid <= CEA_VIDEO_MODES_NUM) {
|
||||
Mode = xf86DuplicateMode(CEAVideoModes + (vid - 1));
|
||||
*Modes = xf86ModesAdd(*Modes, Mode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user