diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-05-20 09:04:39 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-05-20 09:04:39 +0000 |
commit | feb29659f1be2d94569afed60919b351a685abc8 (patch) | |
tree | dafad940dc82a81ce3b87575abfaa12b1e2ea542 /Src/subst.c | |
parent | ad3d514ac79b573ce43fa7089175de519f39f21d (diff) | |
download | zsh-feb29659f1be2d94569afed60919b351a685abc8.tar.gz zsh-feb29659f1be2d94569afed60919b351a685abc8.tar.xz zsh-feb29659f1be2d94569afed60919b351a685abc8.zip |
users/14143 plus tweak in padding code:
use default IFS if IFS is unset
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/subst.c b/Src/subst.c index 8a695cee9..5d14c458a 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -714,9 +714,10 @@ dopadding(char *str, int prenum, int postnum, char *preone, char *postone, convchar_t cchar; MB_METACHARINIT(); - if (*ifs) - def = dupstrpfx(ifs, MB_METACHARLEN(ifs)); - else + if (!ifs || *ifs) { + char *tmpifs = ifs ? ifs : DEFAULT_IFS; + def = dupstrpfx(tmpifs, MB_METACHARLEN(tmpifs)); + } else def = ""; if (preone && !*preone) preone = def; |