summaryrefslogtreecommitdiff
path: root/src/misc/wordexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/wordexp.c')
-rw-r--r--src/misc/wordexp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c
index 4609b99f..4a3efc7b 100644
--- a/src/misc/wordexp.c
+++ b/src/misc/wordexp.c
@@ -136,7 +136,8 @@ static int do_wordexp(const char *s, wordexp_t *we, int flags)
}
we->we_wordv = wv;
- we->we_wordc = i - we->we_offs;
+ we->we_wordc = i;
+ if (flags & WRDE_DOOFFS) we->we_wordc -= we->we_offs;
return err;
}