Diff between 5f0002cc90997d14083e54a91c1f45134b7905a0 and ee46e92bdef44e85cf4d6b10e08d56a2aa7706be

Changed Files

File Additions Deletions Status
src/shared/shell.c +5 -0 modified

Full Patch

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 2ecc41b..add4fa1 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -289,6 +289,11 @@ static bool input_read(struct io *io, void *user_data)
 
 	fd = io_get_fd(io);
 
+	if (fd < 0) {
+		printf("io_get_fd() returned %d\n", fd);
+		return false;
+	}
+
 	if (fd == STDIN_FILENO) {
 		rl_callback_read_char();
 		return true;