Skip to content

Commit

Permalink
Don't crash if there's no "EDID (in hex):" line in the log file.
Browse files Browse the repository at this point in the history
  • Loading branch information
anholt committed Feb 8, 2007
1 parent 3f4668e commit aece008
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion edid-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ extract_edid(int fd)
}

/* I think it is, let's go scanning */
if (!(start = strstr(strstr(ret1, "EDID (in hex):"), "(II)")))
if (!(start = strstr(ret1, "EDID (in hex):")))
return ret1;
if (!(start = strstr(start, "(II)")))
return ret1;

for (c = start; *c; c++) {
Expand Down

0 comments on commit aece008

Please sign in to comment.