diff options
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; |