# HG changeset patch # User atmos4 # Date 1038230920 0 # Node ID be311f8284768f390bf6cd5f0e51baf583801889 # Parent 226e6866212d188079b7027b68edd2a7626f1bfd Fix endless-loop if no newline at input.conf EOF diff -r 226e6866212d -r be311f828476 input/input.c --- a/input/input.c Mon Nov 25 02:19:27 2002 +0000 +++ b/input/input.c Mon Nov 25 13:28:40 2002 +0000 @@ -1239,15 +1239,15 @@ 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;