summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/join.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/join.c b/src/join.c
index fa18c9d06..6eaad6575 100644
--- a/src/join.c
+++ b/src/join.c
@@ -249,13 +249,13 @@ xfields (struct line *line)
if (ptr == lim)
return;
- if (0 <= tab)
+ if (0 <= tab && tab != '\n')
{
char *sep;
for (; (sep = memchr (ptr, tab, lim - ptr)) != NULL; ptr = sep + 1)
extract_field (line, ptr, sep - ptr);
}
- else
+ else if (tab < 0)
{
/* Skip leading blanks before the first field. */
while (isblank (to_uchar (*ptr)))