mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-18 23:11:49 +00:00
Fix adb get-serialno error handling
If pipe read fails, return.
This commit is contained in:
parent
3653fb6b15
commit
b0eb1a55d6
1 changed files with 4 additions and 0 deletions
|
@ -304,6 +304,10 @@ adb_get_serialno(struct sc_intr *intr) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
sc_str_truncate(buf, r, " \r\n");
|
sc_str_truncate(buf, r, " \r\n");
|
||||||
|
|
||||||
return strdup(buf);
|
return strdup(buf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue