[Mplayer-cvslog] CVS: main parser-cfg.c,1.3,1.4

Richard Felker CVS rfelker at mplayerhq.hu
Thu Jun 5 00:07:10 CEST 2003


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

Modified Files:
	parser-cfg.c 
Log Message:
1000l! crashing on broken config files finally fixed!

Patch by Alex Sisson (alex_sisson at yahoo.co.uk):

a missing parameter on mp_msg meant it crashed instead
of printing a nice message if you put entries in the
config with no parameter.

also did a few english-tidies on error messages in
there.


Index: parser-cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/parser-cfg.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- parser-cfg.c	3 Apr 2003 12:41:31 -0000	1.3
+++ parser-cfg.c	4 Jun 2003 22:06:44 -0000	1.4
@@ -121,7 +121,7 @@
 		/* check '=' */
 		if (line[line_pos++] != '=') {
 			PRINT_LINENUM;
-			mp_msg(MSGT_CFGPARSER,MSGL_ERR,"Option %s need a parameter at line %d\n",line_num);
+			mp_msg(MSGT_CFGPARSER,MSGL_ERR,"Option %s needs a parameter at line %d\n",opt,line_num);
 			ret = -1;
 			errors++;
 			continue;
@@ -139,7 +139,7 @@
 				param[param_pos++] = line[line_pos++];
 				if (param_pos >= MAX_PARAM_LEN) {
 					PRINT_LINENUM;
-					mp_msg(MSGT_CFGPARSER,MSGL_ERR,"Option %s have a too long parameter at line %d\n",opt,line_num);
+					mp_msg(MSGT_CFGPARSER,MSGL_ERR,"Option %s has a too long parameter at line %d\n",opt,line_num);
 					ret = -1;
 					errors++;
 					goto nextline;
@@ -164,7 +164,7 @@
 		/* did we read a parameter? */
 		if (param_pos == 0) {
 			PRINT_LINENUM;
-			mp_msg(MSGT_CFGPARSER,MSGL_ERR,"Option %s need a parameter at line %d\n",opt,line_num);
+			mp_msg(MSGT_CFGPARSER,MSGL_ERR,"Option %s needs a parameter at line %d\n",opt,line_num);
 			ret = -1;
 			errors++;
 			continue;



More information about the MPlayer-cvslog mailing list