Commit 95dd6bb0 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix MS-Windows build following last change

* src/emacs.c (real_filename) [WINDOWSNT]: Fix off-by-one error
when allocating storage for a file name.
parent 0c1fc9d5
Pipeline #10314 failed with stages
in 44 minutes and 2 seconds
......@@ -450,16 +450,14 @@ real_filename (char *filename)
#ifdef WINDOWSNT
/* w32_my_exename resolves symlinks internally, so no need to
call realpath. */
real_name = xmalloc (strlen (filename));
strcpy (real_name, filename);
return real_name;
real_name = xstrdup (filename);
#else
real_name = realpath (filename, NULL);
if (!real_name)
fatal ("could not resolve realpath of \"%s\": %s",
filename, strerror (errno));
return real_name;
#endif
return real_name;
}
/* Set `invocation-name' `invocation-directory'. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment