aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPo Lu2021-12-12 21:40:17 +0800
committerPo Lu2021-12-12 21:40:17 +0800
commit2de147e93c69a3ae2c74b5264ab5c6e46598ac31 (patch)
tree90d45568a83b72f66e2246b1de64818f9e6d4a90 /lib-src
parent87cdc6369acc7ae8537d9156e8231821e3378c9a (diff)
parent0ee1a46e6c7fa159584a9c04f5ab9bf694d6de3b (diff)
downloademacs-2de147e93c69a3ae2c74b5264ab5c6e46598ac31.tar.gz
emacs-2de147e93c69a3ae2c74b5264ab5c6e46598ac31.zip
Merge remote-tracking branch 'origin/master' into feature/pgtk
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index bd4d4fcf53a..71f3464661c 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -5773,7 +5773,7 @@ static void
5773TEX_decode_env (const char *evarname, const char *defenv) 5773TEX_decode_env (const char *evarname, const char *defenv)
5774{ 5774{
5775 const char *env, *p; 5775 const char *env, *p;
5776 ptrdiff_t len; 5776 ptrdiff_t len = 1;
5777 5777
5778 /* Append default string to environment. */ 5778 /* Append default string to environment. */
5779 env = getenv (evarname); 5779 env = getenv (evarname);
@@ -5782,8 +5782,13 @@ TEX_decode_env (const char *evarname, const char *defenv)
5782 else 5782 else
5783 env = concat (env, defenv, ""); 5783 env = concat (env, defenv, "");
5784 5784
5785 /* If the environment variable doesn't start with a colon, increase
5786 the length of the token table. */
5787 if (*env != ':')
5788 len++;
5789
5785 /* Allocate a token table */ 5790 /* Allocate a token table */
5786 for (len = 1, p = env; (p = strchr (p, ':')); ) 5791 for (p = env; (p = strchr (p, ':')); )
5787 if (*++p) 5792 if (*++p)
5788 len++; 5793 len++;
5789 TEX_toktab = xnew (len, linebuffer); 5794 TEX_toktab = xnew (len, linebuffer);