summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 2fc93631c9e..896e129c75f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -917,7 +917,8 @@ load_pdump (int argc, char **argv)
/* Assume the Emacs binary lives in a sibling directory as set up by
the default installation configuration. */
const char *go_up = "../../../../bin/";
- needed += strlen (strip_suffix) - strlen (suffix) + strlen (go_up);
+ needed += (strip_suffix ? strlen (strip_suffix) : 0)
+ - strlen (suffix) + strlen (go_up);
if (exec_bufsize < needed)
{
xfree (emacs_executable);
@@ -925,7 +926,8 @@ load_pdump (int argc, char **argv)
-1, 1);
}
sprintf (emacs_executable, "%s%c%s%s%s",
- path_exec, DIRECTORY_SEP, go_up, argv0_base, strip_suffix);
+ path_exec, DIRECTORY_SEP, go_up, argv0_base,
+ strip_suffix ? strip_suffix : "");
result = pdumper_load (dump_file, emacs_executable);
if (result == PDUMPER_LOAD_FILE_NOT_FOUND)