mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-07 16:06:10 +00:00
fix off-by-one error in example app (#623)
This commit is contained in:
parent
068fe80c07
commit
52042f8c3e
@ -214,7 +214,7 @@ public class TerminalFragment extends Fragment implements SerialInputOutputManag
|
|||||||
status("connection failed: no driver for device");
|
status("connection failed: no driver for device");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(driver.getPorts().size() < portNum) {
|
if(portNum >= driver.getPorts().size()) {
|
||||||
status("connection failed: not enough ports at device");
|
status("connection failed: not enough ports at device");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user