From d6127242c41e7805b8c77131f4cbbb304e0d7d39 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 14 May 2021 21:46:24 +0100 Subject: [PATCH] lib.c: (set_progname): Set program name even if `argv[0]' has no `/'. At least it was `???' and not a null pointer, but it's still rather poor. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 251d932..eb2a586 100644 --- a/lib.c +++ b/lib.c @@ -51,7 +51,7 @@ void set_progname(const char *prog) const char *p; p = strrchr(prog, '/'); - progname = p ? p + 1 : progname; + progname = p ? p + 1 : prog; } /* Report an error or warning in Unix style, given a captured argument -- 2.11.0