changeset 4841:a8c464186ec9

Fix "audtool help playback-seek-relative" crash (Debian bug #512910)
author John Lindgren
date Thu, 09 Apr 2009 20:43:01 -0400
parents a4dd5fcc46ce
children 62cb85252393
files src/audtool/main.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audtool/main.c	Wed Mar 04 15:36:58 2009 +0100
+++ b/src/audtool/main.c	Thu Apr 09 20:43:01 2009 -0400
@@ -199,7 +199,7 @@
 			     !g_ascii_strcasecmp(g_strconcat("--", handlers[i].name, NULL), argv[j]))
 			    && g_ascii_strcasecmp("<sep>", handlers[i].name))
   			{
-				int numargs = handlers[i].args + 1 < argc - 1 ? handlers[i].args + 1 : argc - 1;
+				int numargs = handlers[i].args + 1 < argc - j ? handlers[i].args + 1 : argc - j;
 				handlers[i].handler(numargs, &argv[j]);
 				j += handlers[i].args;
 				k++;