diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-26 16:11:35 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-26 16:11:35 +0000 |
commit | d7c51f1ad32ed6da8789e33ac8400706add4ff8b (patch) | |
tree | 142f8304379846f8fde6049e08ccf628a9fd2e53 | |
parent | 0cba7d110b04b0e899968e15e3b2e79b25e833dc (diff) |
Ok, firstly fixed the bug in parser-mpcmd.c where it
would accept a non-interger as an argument for -loop
(beginning of cmdline)..and have made it print an
error the same as when you pass a non-int to -loop
(end of cmdline) (parsed in different places).
patch by Alex Sisson <alex_sisson@yahoo.co.uk>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9107 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | parser-mpcmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parser-mpcmd.c b/parser-mpcmd.c index c407dec03d..1d87416a74 100644 --- a/parser-mpcmd.c +++ b/parser-mpcmd.c @@ -216,9 +216,10 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) int l; char* end; l = (i+1<argc) ? strtol(argv[i+1],&end,0) : 0; - if(!end) + if(*end != '\0') { + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The loop option must be an integer: %s\n",argv[i+1]); tmp = ERR_OUT_OF_RANGE; - else { + } else { play_tree_t* pt = last_entry ? last_entry : last_parent; l = l <= 0 ? -1 : l; pt->loop = l; |