changeset 8400:587b62cd4119

10l noticed by "Puk Madick" <pingy@swirvemail.com>
author arpi
date Sat, 07 Dec 2002 20:59:33 +0000
parents 866fae3d5700
children 1b2fc92980d9
files parser-mpcmd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/parser-mpcmd.c	Sat Dec 07 20:32:03 2002 +0000
+++ b/parser-mpcmd.c	Sat Dec 07 20:59:33 2002 +0000
@@ -215,7 +215,7 @@
 		  (! last_entry || last_entry->child) ) {
 	  int l;
 	  char* end;
-	  l = strtol(argv[i+1],&end,0);
+	  l = (i+1<argc) ? strtol(argv[i+1],&end,0) : 0;
 	  if(!end)
 	    tmp = ERR_OUT_OF_RANGE;
 	  else {