From be44c5c04af748c4fbdec85a9aab6413085bd894 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 17 Feb 2002 12:43:39 +0000 Subject: [PATCH] --help printed part of the path for irssi which looked stupid, now it prints only the binary name. patch by tommik. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2495 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/lib-popt/popthelp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib-popt/popthelp.c b/src/lib-popt/popthelp.c index 243f868e..15ed2d95 100644 --- a/src/lib-popt/popthelp.c +++ b/src/lib-popt/popthelp.c @@ -175,7 +175,7 @@ static int showHelpIntro(poptContext con, FILE * f) { fprintf(f, POPT_("Usage:")); if (!(con->flags & POPT_CONTEXT_KEEP_FIRST)) { fn = con->optionStack->argv[0]; - if (strchr(fn, '/')) fn = strchr(fn, '/') + 1; + if (strrchr(fn, '/')) fn = strrchr(fn, '/') + 1; fprintf(f, " %s", fn); len += strlen(fn) + 1; }