mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-06 23:46:33 +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");
|
||||
return;
|
||||
}
|
||||
if(driver.getPorts().size() < portNum) {
|
||||
if(portNum >= driver.getPorts().size()) {
|
||||
status("connection failed: not enough ports at device");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user