Skip to content

Commit d33b5d6

Browse files
authored
Display (Linux): fix the error check for ffReadFileData (#1622)
1 parent ef5d123 commit d33b5d6

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

src/detection/displayserver/linux/drm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static const char* drmParseSysfs(FFDisplayServerResult* result)
3030

3131
char buf;
3232
ffStrbufAppendS(&drmDir, "/enabled");
33-
if (!ffReadFileData(drmDir.chars, sizeof(buf), &buf) || buf != 'e') {
33+
if (ffReadFileData(drmDir.chars, sizeof(buf), &buf) <= 0 || buf != 'e') {
3434
/* read failed or enabled != "enabled" */
3535
ffStrbufSubstrBefore(&drmDir, drmDirWithDnameLength);
3636
ffStrbufAppendS(&drmDir, "/status");

0 commit comments

Comments
 (0)