diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-25 13:28:40 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-25 13:28:40 +0000 |
commit | 6f68af620831f6883852edea63693507bb6af39a (patch) | |
tree | 7930a03bbc24b665b030c94e4c2b7987a7a77deb /input | |
parent | 3160c935c208a3e9dc80fd7b9cc274f0b9e93eb5 (diff) | |
download | mpv-6f68af620831f6883852edea63693507bb6af39a.tar.bz2 mpv-6f68af620831f6883852edea63693507bb6af39a.tar.xz |
Fix endless-loop if no newline at input.conf EOF
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8275 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/input/input.c b/input/input.c index e68f9632f8..f6b6b823bb 100644 --- a/input/input.c +++ b/input/input.c @@ -1239,15 +1239,15 @@ mp_input_parse_config(char *file) { mp_input_free_binds(binds); close(fd); return 0; - } else if(r == 0) + } else if(r == 0) { eof = 1; - else { + } else { bs += r+1; buffer[bs-1] = '\0'; } } // Empty buffer : return - if(bs <= 0) { + if(eof || (bs <= 0)) { mp_msg(MSGT_INPUT,MSGL_INFO,"Input config file %s parsed : %d binds\n",file,n_binds); if(binds) cmd_binds = binds; |