aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-01-14 22:17:04 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-01-14 22:17:04 +0200
commitc338576a8fefa700cb989319d10d27f6f31e9b00 (patch)
treecbc1751f4f8088fcb0124bd5c994af2a035e39d2 /field.c
parent2389064eb3fe7c5b2b144eb2f5d556a812ba1911 (diff)
downloadegawk-c338576a8fefa700cb989319d10d27f6f31e9b00.tar.gz
egawk-c338576a8fefa700cb989319d10d27f6f31e9b00.tar.bz2
egawk-c338576a8fefa700cb989319d10d27f6f31e9b00.zip
Bug fix to do_split().
Diffstat (limited to 'field.c')
-rw-r--r--field.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/field.c b/field.c
index 0a7cee8f..5a1bf562 100644
--- a/field.c
+++ b/field.c
@@ -1013,7 +1013,9 @@ do_split(int nargs)
return make_number((AWKNUM) 0);
}
- if ((sep->re_flags & FS_DFLT) != 0 && current_field_sep() != Using_FIELDWIDTHS && ! RS_is_null) {
+ if ( (sep->re_flags & FS_DFLT) != 0
+ && current_field_sep() == Using_FS
+ && ! RS_is_null) {
parseit = parse_field;
fs = force_string(FS_node->var_value);
rp = FS_regexp;