Mercurial > mplayer.hg
changeset 10245:a660de2556c2
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.
author | rfelker |
---|---|
date | Wed, 04 Jun 2003 22:06:44 +0000 |
parents | a084597140af |
children | 3b4f756c06f6 |
files | parser-cfg.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;