Skip to content

Commit d5d935a

Browse files
committed
DisplayServer (Linux): fix invalid display name detection
1 parent 44ccc69 commit d5d935a

File tree

1 file changed

+1
-1
lines changed
  • src/detection/displayserver/linux/wayland

1 file changed

+1
-1
lines changed

src/detection/displayserver/linux/wayland/wayland.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static bool matchDrmConnector(const char* connName, WaylandDisplay* wldata)
109109

110110
uint8_t edidData[512];
111111
ssize_t edidLength = ffReadFileData(path.chars, sizeof(edidData), edidData);
112-
if (edidLength <= 0 || edidLength % 128 != 0)
112+
if (edidLength > 0 && edidLength % 128 == 0)
113113
{
114114
ffEdidGetName(edidData, &wldata->edidName);
115115
ffEdidGetHdrCompatible(edidData, (uint32_t) edidLength);

0 commit comments

Comments
 (0)