From cc2d2e8d6c7d52d2fbbf9ffe410f97952c64cb3e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 18 Apr 2021 14:56:00 +0300 Subject: [PATCH] ; * src/emacs.c (load_pdump_find_executable): Yet another fix. --- src/emacs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emacs.c b/src/emacs.c index 922da9f1da3..c09ad97a701 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -749,7 +749,11 @@ load_pdump_find_executable (char const *argv0, ptrdiff_t *candidate_size) path already, so just copy it. */ eassert (argv0); if (strchr (argv0, DIRECTORY_SEP)) - return xstrdup (argv0); + { + char *val = xstrdup (argv0); + *candidate_size = strlen (val) + 1; + return val; + } ptrdiff_t argv0_length = strlen (argv0); const char *path = getenv ("PATH"); -- 2.39.5