summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-25 07:30:17 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-08-25 07:30:17 +0000
commitcd2a7ee82f0db92d99b5a6e3085b40d3763cd9e8 (patch)
tree88e7d4ef00f9101e0f332c1e0e390550b00ee60a /input
parentfde163a48fc1e2879303482839569ae391b2dc2d (diff)
downloadmpv-cd2a7ee82f0db92d99b5a6e3085b40d3763cd9e8.tar.bz2
mpv-cd2a7ee82f0db92d99b5a6e3085b40d3763cd9e8.tar.xz
Fix invalid fd check, the bug is somewhere else though.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24157 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input')
-rw-r--r--input/input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/input/input.c b/input/input.c
index 4a49312571..77b111bde4 100644
--- a/input/input.c
+++ b/input/input.c
@@ -600,7 +600,7 @@ mp_input_add_cmd_fd(int fd, int select, mp_cmd_func_t read_func, mp_close_func_t
mp_msg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds,fd);
return 0;
}
- if (fd < 0) {
+ if (select && fd < 0) {
mp_msg(MSGT_INPUT, MSGL_ERR, "Invalid fd %i in mp_input_add_cmd_fd", fd);
return 0;
}
@@ -659,7 +659,7 @@ mp_input_add_key_fd(int fd, int select, mp_key_func_t read_func, mp_close_func_t
mp_msg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantRegister2ManyKeyFds,fd);
return 0;
}
- if (fd < 0) {
+ if (select && fd < 0) {
mp_msg(MSGT_INPUT, MSGL_ERR, "Invalid fd %i in mp_input_add_key_fd", fd);
return 0;
}