summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-10-26 08:00:35 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-10-26 08:00:35 +0300
commit463ef15103eb7708e2f295920faf5a8def306aa0 (patch)
tree11a633067620beef0f54f7255a7d9635cdb94368
parent04e37f2ec691b6ba1f4e4d57e4baaccbcdd305cc (diff)
downloadgawk-463ef15103eb7708e2f295920faf5a8def306aa0.tar.gz
Minor bug fix for init_awkpath.
-rw-r--r--ChangeLog4
-rw-r--r--io.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 84817fef..9bed030f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-26 Arnold D. Robbins <arnold@skeeve.com>
+
+ * io.c (init_awkpath): Set max path len for leading separator.
+
2016-10-25 Arnold D. Robbins <arnold@skeeve.com>
* io.c (init_awkpath): Restore documented behavior whereby
diff --git a/io.c b/io.c
index 931dcfe2..ab4029e1 100644
--- a/io.c
+++ b/io.c
@@ -2613,8 +2613,10 @@ init_awkpath(path_info *pi)
start = path;
i = 0;
- if (*path == envsep) /* null entry at front of path */
+ if (*path == envsep) { /* null entry at front of path */
pi->awkpath[i++] = ".";
+ pi->max_pathlen = 1;
+ }
while (*start) {
if (*start == envsep) {