1
mirror of https://github.com/mpv-player/mpv synced 2024-10-18 10:25:02 +02:00

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
This commit is contained in:
arpi 2003-01-26 16:11:35 +00:00
parent 0cba7d110b
commit d7c51f1ad3

View File

@ -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;