]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix last change
authorEli Zaretskii <eliz@gnu.org>
Sun, 18 Apr 2021 09:00:25 +0000 (12:00 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 18 Apr 2021 09:00:25 +0000 (12:00 +0300)
* src/emacs.c (load_pdump_find_executable): Fix the value of
CANDIDATE_SIZE when the final candidate is a symlink.

src/emacs.c

index 896e129c75f4de5e70ae6f5256ed9c5bb93f4feb..922da9f1da3d11e64c563e9b1ceda9645953cbcb 100644 (file)
@@ -795,7 +795,10 @@ load_pdump_find_executable (char const *argv0, ptrdiff_t *candidate_size)
              char *real_name = realpath (candidate, NULL);
 
              if (real_name)
-               return real_name;
+               {
+                 *candidate_size = strlen (real_name) + 1;
+                 return real_name;
+               }
            }
          return candidate;
        }