On Sat, Apr 09, 2011 at 09:40:41PM +0200, Sami Kerola wrote: > Signed-off-by: Sami Kerola <kerolasa@xxxxxx> > --- > term-utils/scriptreplay.c | 47 ++++++++++++++++++++++++++++++++++++-------- > 1 files changed, 38 insertions(+), 9 deletions(-) Fixed & Applied, thanks. > + argc -= optind; > + argv += optind; > + > + if (argc < 1 || 3 < argc) { > + warnx(_("wrong number of arguments")); > + usage(stderr); > + } > > - tname = argv[1]; > - sname = argc > 2 ? argv[2] : "typescript"; > - divi = argc == 4 ? getnum(argv[3]) : 1; > + tname = argv[0]; > + sname = argc > 2 ? argv[1] : "typescript"; > + divi = argc == 4 ? getnum(argv[2]) : 1; You have to update the conditions with argc + tname = argv[0]; + sname = argc > 1 ? argv[1] : "typescript"; + divi = argc == 3 ? getnum(argv[2]) : 1; Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html