# HG changeset patch # User rfelker # Date 1054764404 0 # Node ID a660de2556c23c5d3bb2b0cbdbe4d32dfea94929 # Parent a084597140afd99d0df2b95a995f96e59bffc8ee 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. diff -r a084597140af -r a660de2556c2 parser-cfg.c --- a/parser-cfg.c Wed Jun 04 10:52:58 2003 +0000 +++ b/parser-cfg.c Wed Jun 04 22:06:44 2003 +0000 @@ -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;