diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-10-31 22:01:20 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-10-31 22:01:20 +0200 |
commit | 1944a636afaf7fd41f8d1d29b0e1b813cbde25a4 (patch) | |
tree | dbbfbef63c2ef4c5c015411a27045a0345767023 /io.c | |
parent | 7a985e9734fe4517c92c86bc45cfea20129aa482 (diff) | |
parent | a4d313ca20a63d28b7a2020e6897f4e3e04dae6e (diff) | |
download | egawk-1944a636afaf7fd41f8d1d29b0e1b813cbde25a4.tar.gz egawk-1944a636afaf7fd41f8d1d29b0e1b813cbde25a4.tar.bz2 egawk-1944a636afaf7fd41f8d1d29b0e1b813cbde25a4.zip |
Merge branch 'master' into feature/typed-regex
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2742,8 +2742,9 @@ init_awkpath(path_info *pi) if (*p == envsep) max_path++; - emalloc(pi->awkpath, char **, (max_path + 1) * sizeof(char *), "init_awkpath"); - memset(pi->awkpath, 0, (max_path + 1) * sizeof(char *)); + // +3 --> 2 for null entries at front and end of path, 1 for NULL end of list + emalloc(pi->awkpath, char **, (max_path + 3) * sizeof(char *), "init_awkpath"); + memset(pi->awkpath, 0, (max_path + 3) * sizeof(char *)); start = path; i = 0; |