diff options
author | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-06-04 22:06:44 +0000 |
---|---|---|
committer | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-06-04 22:06:44 +0000 |
commit | 3e4aa8b0bda665bb939612beb897c4925ef97dd0 (patch) | |
tree | 332840c8b48d6d79774a8f4f4cbce22b7239236d /parser-cfg.c | |
parent | 0473f386a42f64e5194dd195814b38221ff4f831 (diff) | |
download | mpv-3e4aa8b0bda665bb939612beb897c4925ef97dd0.tar.bz2 mpv-3e4aa8b0bda665bb939612beb897c4925ef97dd0.tar.xz |
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
Diffstat (limited to 'parser-cfg.c')
-rw-r--r-- | parser-cfg.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |