[Mplayer-cvslog] CVS: main parser-mpcmd.c,1.6,1.7

Arpi of Ize arpi at mplayerhq.hu
Sun Jan 26 17:11:39 CET 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv6544

Modified Files:
	parser-mpcmd.c 
Log Message:
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 at yahoo.co.uk>


Index: parser-mpcmd.c
===================================================================
RCS file: /cvsroot/mplayer/main/parser-mpcmd.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- parser-mpcmd.c	15 Dec 2002 17:05:35 -0000	1.6
+++ parser-mpcmd.c	26 Jan 2003 16:11:35 -0000	1.7
@@ -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;



More information about the MPlayer-cvslog mailing list