about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/subst.c7
-rw-r--r--Src/utils.c2
2 files changed, 5 insertions, 4 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;
diff --git a/Src/utils.c b/Src/utils.c
index e7a4595b8..00d51a320 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3162,7 +3162,7 @@ inittyptab(void)
     }
 #ifdef MULTIBYTE_SUPPORT
     set_widearray(wordchars, &wordchars_wide);
-    set_widearray(ifs, &ifs_wide);
+    set_widearray(ifs ? ifs : DEFAULT_IFS, &ifs_wide);
 #endif
     for (s = SPECCHARS; *s; s++)
 	typtab[STOUC(*s)] |= ISPECIAL;