From 3e4aa8b0bda665bb939612beb897c4925ef97dd0 Mon Sep 17 00:00:00 2001 From: rfelker Date: Wed, 4 Jun 2003 22:06:44 +0000 Subject: 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 --- parser-cfg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'parser-cfg.c') diff --git a/parser-cfg.c b/parser-cfg.c index 69f999fd99..7e6de0d929 100644 --- a/parser-cfg.c +++ b/parser-cfg.c @@ -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; -- cgit v1.2.3