Mercurial > mplayer.hg
changeset 9106:2c1aee5bb754
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>
author | arpi |
---|---|
date | Sun, 26 Jan 2003 16:11:35 +0000 |
parents | 9b387eae87e6 |
children | ed5fcc844daf |
files | parser-mpcmd.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/parser-mpcmd.c Sun Jan 26 16:11:08 2003 +0000 +++ b/parser-mpcmd.c Sun Jan 26 16:11:35 2003 +0000 @@ -216,9 +216,10 @@ 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;