[Mplayer-cvslog] CVS: main/input input.c,1.58,1.59

Atmosfear atmos4 at mplayerhq.hu
Mon Nov 25 14:29:02 CET 2002


Update of /cvsroot/mplayer/main/input
In directory mail:/var/tmp.root/cvs-serv27164/input

Modified Files:
	input.c 
Log Message:
Fix endless-loop if no newline at input.conf EOF


Index: input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- input.c	23 Nov 2002 10:58:14 -0000	1.58
+++ input.c	25 Nov 2002 13:28:40 -0000	1.59
@@ -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;




More information about the MPlayer-cvslog mailing list