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.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10246 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rfelker 2003-06-04 22:06:44 +00:00
parent 0473f386a4
commit 3e4aa8b0bd
1 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ int m_config_parse_config_file(m_config_t* config, char *conffile)
/* 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 @@ int m_config_parse_config_file(m_config_t* config, char *conffile)
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 @@ int m_config_parse_config_file(m_config_t* config, char *conffile)
/* 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;