diff options
| author | Eli Zaretskii | 2019-02-02 17:12:13 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-02-02 17:12:13 +0200 |
| commit | c73d18ac423c5f96a3250e0a6dc983c17d9bd66c (patch) | |
| tree | a60dcae032b3b545eb86b37e8fb21c90be081461 /src | |
| parent | 2f55b971b42d13188157331a1e514949f20ced4f (diff) | |
| download | emacs-c73d18ac423c5f96a3250e0a6dc983c17d9bd66c.tar.gz emacs-c73d18ac423c5f96a3250e0a6dc983c17d9bd66c.zip | |
Prevent segfault in bootstrap-emacs on MinGW
* src/emacs.c (main) [WINDOWSNT]: Fix logic of determining by
argv[0] whether to use the static heap. (Bug#34277)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/emacs.c b/src/emacs.c index ff814a149b3..869b5307f23 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -914,7 +914,9 @@ main (int argc, char **argv) | |||
| 914 | happens. This relies on the static heap being needed only in | 914 | happens. This relies on the static heap being needed only in |
| 915 | temacs and only if we are going to dump with unexec. */ | 915 | temacs and only if we are going to dump with unexec. */ |
| 916 | bool use_dynamic_heap = false; | 916 | bool use_dynamic_heap = false; |
| 917 | if (strstr (argv[0], "temacs") != NULL) | 917 | char *temacs_str = strstr (argv[0], "temacs"); |
| 918 | if (temacs_str != NULL | ||
| 919 | && (temacs_str == argv[0] || IS_DIRECTORY_SEP (temacs_str[-1]))) | ||
| 918 | { | 920 | { |
| 919 | eassert (temacs); | 921 | eassert (temacs); |
| 920 | /* Note that gflags are set at this point only if we have been | 922 | /* Note that gflags are set at this point only if we have been |