aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/px4io/px4io.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp
index ed8f86fae..73204e220 100644
--- a/src/drivers/px4io/px4io.cpp
+++ b/src/drivers/px4io/px4io.cpp
@@ -3070,12 +3070,13 @@ lockdown(int argc, char *argv[])
if (ret > 0) {
- read(0, &c, 1);
+ if (read(0, &c, 1) > 0) {
- if (c != 'y') {
- exit(0);
- } else if (c == 'y') {
- break;
+ if (c != 'y') {
+ exit(0);
+ } else if (c == 'y') {
+ break;
+ }
}
}