logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: f85faf60cc03aeda893594dd829e5fba54f1cd03
parent a2db357dfa6045d1d5c2a829ae138ddcac783601
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 26 Mar 2025 16:22:49 +0100

cmd/base64: fix strrchr(arg0, …) logic

Diffstat:

Mcmd/base64.c4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/base64.c b/cmd/base64.c @@ -573,8 +573,8 @@ main(int argc, char *argv[]) { const char *arg0 = argv[0]; - const char *s = strrchr(arg0, '/') + 1; - if(s) arg0 = s; + const char *s = strrchr(arg0, '/'); + if(s) arg0 = s + 1; if(strcmp(arg0, "base64") == 0) return base64_main(argc, argv); if(strcmp(arg0, "uuencode") == 0) return uuencode_main(argc, argv);