mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-15 02:00:22 +00:00
d/hdk: handle 0 bytes read
This commit is contained in:
parent
bc1d355e26
commit
e7fff3e435
|
@ -135,6 +135,9 @@ hdk_device_update(struct hdk_device *hd)
|
|||
}
|
||||
hd->quat_valid = false;
|
||||
return 0;
|
||||
} else if (bytesRead == 0) {
|
||||
HDK_WARN(hd, "Read 0 bytes from device");
|
||||
return 1;
|
||||
}
|
||||
while (bytesRead > 0) {
|
||||
if (bytesRead != MSG_LEN_LARGE && bytesRead != MSG_LEN_SMALL) {
|
||||
|
|
Loading…
Reference in a new issue